From 394edbb35ea78a64873fb86115bdb4d9afc54000 Mon Sep 17 00:00:00 2001 From: Nimi Wariboko Jr Date: Wed, 13 Nov 2019 13:19:05 -0800 Subject: [PATCH] Update tests for task name dependent roles --- gatekeeper_test.go | 2 +- scheduler/mock/mock.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gatekeeper_test.go b/gatekeeper_test.go index 8f5ac21..94ab7a7 100644 --- a/gatekeeper_test.go +++ b/gatekeeper_test.go @@ -268,7 +268,7 @@ func TestRequestToken(t *testing.T) { } policyPath := "v1/secret/data/" + ksuid.New().String() - for _, appRoleName := range []string{"mock", "test_role"} { + for _, appRoleName := range []string{"mock", "test_role", "special"} { r, err := vault.Request{goreq.Request{ Uri: vault.Path("/v1/auth/" + authPath + "/role/" + appRoleName), MaxRedirects: 10, diff --git a/scheduler/mock/mock.go b/scheduler/mock/mock.go index d1f9d45..ab9ec61 100644 --- a/scheduler/mock/mock.go +++ b/scheduler/mock/mock.go @@ -58,7 +58,7 @@ func (m *mockScheduler) LookupTask(taskId string) (scheduler.Task, error) { if taskId == "localhost" { return &task{ id: taskId, - name: "special", + name: "localhost", startTime: time.Now(), ip: net.IPv4(127, 0, 0, 1), }, nil