Skip to content

Commit

Permalink
client: fix test to pass non-nil context
Browse files Browse the repository at this point in the history
Signed-off-by: Prateek Malhotra <[email protected]>
  • Loading branch information
someone1 authored and aeneasr committed Sep 23, 2018
1 parent 4188f69 commit c525bd0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions client/manager_test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ func TestHelperClientAuthenticate(k string, m Manager) func(t *testing.T) {
func TestHelperCreateGetDeleteClient(k string, m Storage) func(t *testing.T) {
return func(t *testing.T) {
t.Parallel()
_, err := m.GetClient(nil, "4321")
assert.NotNil(t, err)

ctx := context.TODO()
_, err := m.GetClient(ctx, "4321")
assert.NotNil(t, err)

c := &Client{
ClientID: "1234",
Expand Down Expand Up @@ -115,7 +114,7 @@ func TestHelperCreateGetDeleteClient(k string, m Storage) func(t *testing.T) {
SecretExpiresAt: 1,
}))

d, err := m.GetClient(nil, "1234")
d, err := m.GetClient(ctx, "1234")
require.NoError(t, err)

compare(t, c, d, k)
Expand Down Expand Up @@ -162,7 +161,7 @@ func TestHelperCreateGetDeleteClient(k string, m Storage) func(t *testing.T) {
err = m.DeleteClient(ctx, "1234")
assert.NoError(t, err)

_, err = m.GetClient(nil, "1234")
_, err = m.GetClient(ctx, "1234")
assert.NotNil(t, err)
}
}
Expand Down

0 comments on commit c525bd0

Please sign in to comment.