diff options
author | Valery Piashchynski <[email protected]> | 2021-08-11 13:44:41 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-08-11 13:44:41 +0300 |
commit | e855ae9fe5673bd95f45f9a265259cb5ecdc9f81 (patch) | |
tree | 6653231b4ad11ba93d3b1562c38a2798abb467ff /plugins/jobs/job | |
parent | de37ed3ae8d08a50d9ffe088c1d58d9dffdf7c9b (diff) |
Remove attempts from the proto, and general jobs options
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/job')
-rw-r--r-- | plugins/jobs/job/job_options_test.go | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/plugins/jobs/job/job_options_test.go b/plugins/jobs/job/job_options_test.go index f4b1dc0c..061e83cc 100644 --- a/plugins/jobs/job/job_options_test.go +++ b/plugins/jobs/job/job_options_test.go @@ -7,36 +7,6 @@ import ( "github.com/stretchr/testify/assert" ) -func TestOptions_CanRetry(t *testing.T) { - opts := &Options{Attempts: 0} - - assert.False(t, opts.CanRetry(0)) - assert.False(t, opts.CanRetry(1)) -} - -func TestOptions_CanRetry_SameValue(t *testing.T) { - opts := &Options{Attempts: 1} - - assert.False(t, opts.CanRetry(0)) - assert.False(t, opts.CanRetry(1)) -} - -func TestOptions_CanRetry_Value(t *testing.T) { - opts := &Options{Attempts: 2} - - assert.True(t, opts.CanRetry(0)) - assert.False(t, opts.CanRetry(1)) - assert.False(t, opts.CanRetry(2)) -} - -func TestOptions_CanRetry_Value3(t *testing.T) { - opts := &Options{Attempts: 3} - - assert.True(t, opts.CanRetry(0)) - assert.True(t, opts.CanRetry(1)) - assert.False(t, opts.CanRetry(2)) -} - func TestOptions_RetryDuration(t *testing.T) { opts := &Options{RetryDelay: 0} assert.Equal(t, time.Duration(0), opts.RetryDuration()) @@ -74,12 +44,10 @@ func TestOptions_Merge(t *testing.T) { Pipeline: "pipeline", Delay: 2, Timeout: 1, - Attempts: 1, RetryDelay: 1, }) assert.Equal(t, "pipeline", opts.Pipeline) - assert.Equal(t, int64(1), opts.Attempts) assert.Equal(t, int64(2), opts.Delay) assert.Equal(t, int64(1), opts.Timeout) assert.Equal(t, int64(1), opts.RetryDelay) @@ -90,7 +58,6 @@ func TestOptions_MergeKeepOriginal(t *testing.T) { Pipeline: "default", Delay: 10, Timeout: 10, - Attempts: 10, RetryDelay: 10, } @@ -98,12 +65,10 @@ func TestOptions_MergeKeepOriginal(t *testing.T) { Pipeline: "pipeline", Delay: 2, Timeout: 1, - Attempts: 1, RetryDelay: 1, }) assert.Equal(t, "default", opts.Pipeline) - assert.Equal(t, int64(10), opts.Attempts) assert.Equal(t, int64(10), opts.Delay) assert.Equal(t, int64(10), opts.Timeout) assert.Equal(t, int64(10), opts.RetryDelay) |