Skip to content

Commit

Permalink
Update manualtoken_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
khareyash05 committed May 4, 2023
1 parent 1c6adb1 commit d664483
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/token/manualtoken_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func TestNewManualToken(t *testing.T) {
if err != nil && err.Error() != tc.wantErr.Error() {
t.Errorf("expected error %v, but got %v", tc.wantErr, err)
}
if err == nil && tc.wantErr != nil {
t.Errorf("expected %v to be nil", tc.wantErr)
}
})
}
}
Expand All @@ -84,8 +87,9 @@ func TestManualTokenToken(t *testing.T) {
provider, _ := newManualToken(oAuthConfig, clientID, resourceID, tenantID, token)

// Test successful token refresh
_, err := provider.Token()
if err == nil {
t.Errorf("Expected no error, but got %v", err)
if _, err := provider.Token(); err == nil {
if err == nil {
t.Errorf("Expected no error, but got %v", err)
}
}
}

0 comments on commit d664483

Please sign in to comment.