Skip to content

Commit

Permalink
Add fixes after running the tests
Browse files Browse the repository at this point in the history
Signed-off-by: PumpkinSeed <qwer.kocka@gmail.com>
  • Loading branch information
PumpkinSeed committed May 10, 2023
1 parent bcb033e commit f39c907
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions storage/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// NewCustomHealthCheckFunc returns a new health check function.
func NewCustomHealthCheckFunc(s Storage, now func() time.Time) func(context.Context) (details interface{}, err error) {
return func(_ context.Context) (details interface{}, err error) {
return func(ctx context.Context) (details interface{}, err error) {
a := AuthRequest{
ID: NewID(),
ClientID: NewID(),
Expand All @@ -19,7 +19,7 @@ func NewCustomHealthCheckFunc(s Storage, now func() time.Time) func(context.Cont
HMACKey: NewHMACKey(crypto.SHA256),
}

if err := s.CreateAuthRequest(a); err != nil {
if err := s.CreateAuthRequest(ctx, a); err != nil {
return nil, fmt.Errorf("create auth request: %v", err)
}

Expand Down
3 changes: 2 additions & 1 deletion storage/kubernetes/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ func TestRetryOnConflict(t *testing.T) {
}

func TestRefreshTokenLock(t *testing.T) {
ctx := context.Background()
if os.Getenv(kubeconfigPathVariableName) == "" {
t.Skipf("variable %q not set, skipping kubernetes storage tests\n", kubeconfigPathVariableName)
}
Expand Down Expand Up @@ -345,7 +346,7 @@ func TestRefreshTokenLock(t *testing.T) {
ConnectorData: []byte(`{"some":"data"}`),
}

err = kubeClient.CreateRefresh(r)
err = kubeClient.CreateRefresh(ctx, r)
require.NoError(t, err)

t.Run("Timeout lock error", func(t *testing.T) {
Expand Down

0 comments on commit f39c907

Please sign in to comment.