diff options
author | Valery Piashchynski <[email protected]> | 2021-07-24 13:12:26 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-24 13:12:26 +0300 |
commit | d72181126867c7e8fc05e5ac927bd90d01e0dbc7 (patch) | |
tree | 3549d8270ae792e91d9cfe3093240f97887c7f65 | |
parent | 685d7b4e88c10643d8ca6f619373544c1ceeac9b (diff) |
Mooore constants :)
Signed-off-by: Valery Piashchynski <[email protected]>
-rw-r--r-- | tests/plugins/jobs/helpers.go | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/plugins/jobs/helpers.go b/tests/plugins/jobs/helpers.go index 27b2d1e0..b5100df5 100644 --- a/tests/plugins/jobs/helpers.go +++ b/tests/plugins/jobs/helpers.go @@ -13,6 +13,13 @@ import ( "github.com/stretchr/testify/require" ) +const ( + push string = "jobs.Push" + pause string = "jobs.Pause" + destroy string = "jobs.Destroy" + resume string = "jobs.Resume" +) + func resumePipes(pipes ...string) func(t *testing.T) { return func(t *testing.T) { conn, err := net.Dial("tcp", "127.0.0.1:6001") @@ -26,7 +33,7 @@ func resumePipes(pipes ...string) func(t *testing.T) { } er := &jobsv1beta.Empty{} - err = client.Call("jobs.Resume", pipe, er) + err = client.Call(resume, pipe, er) assert.NoError(t, err) } } @@ -49,7 +56,7 @@ func pushToDisabledPipe(pipeline string) func(t *testing.T) { }} er := &jobsv1beta.Empty{} - err = client.Call("jobs.Push", req, er) + err = client.Call(push, req, er) assert.Error(t, err) } } @@ -76,7 +83,7 @@ func pushToPipe(pipeline string) func(t *testing.T) { }} er := &jobsv1beta.Empty{} - err = client.Call("jobs.Push", req, er) + err = client.Call(push, req, er) assert.NoError(t, err) } } @@ -94,7 +101,7 @@ func pausePipelines(pipes ...string) func(t *testing.T) { } er := &jobsv1beta.Empty{} - err = client.Call("jobs.Pause", pipe, er) + err = client.Call(pause, pipe, er) assert.NoError(t, err) } } @@ -112,7 +119,7 @@ func destroyPipelines(pipes ...string) func(t *testing.T) { } er := &jobsv1beta.Empty{} - err = client.Call("jobs.Destroy", pipe, er) + err = client.Call(destroy, pipe, er) assert.NoError(t, err) } } |