diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-25 09:26:34 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-25 09:26:34 +0100 |
| commit | 106636991f6f9eb97982d1563b696964ebeaaa40 (patch) | |
| tree | e3994de1ebb35e3ac6104810aec37417401f1a74 /client | |
| parent | 1a6e6d024ee4fb96b433da6eac702ddde9296747 (diff) | |
Client Test: Do not clash oauth name with package
Diffstat (limited to 'client')
| -rw-r--r-- | client/client_test.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/client/client_test.go b/client/client_test.go index ad4fead..2a240bd 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -247,10 +247,10 @@ func TestTokenExpired(t *testing.T) { t.Fatalf("No server found") } - oauth := currentServer.GetOAuth() + serverOAuth := currentServer.GetOAuth() - accessToken := oauth.Token.Access - refreshToken := oauth.Token.Refresh + accessToken := serverOAuth.Token.Access + refreshToken := serverOAuth.Token.Refresh // Wait for TTL so that the tokens expire time.Sleep(time.Duration(expiredInt) * time.Second) @@ -262,8 +262,8 @@ func TestTokenExpired(t *testing.T) { } // Check if tokens have changed - accessTokenAfter := oauth.Token.Access - refreshTokenAfter := oauth.Token.Refresh + accessTokenAfter := serverOAuth.Token.Access + refreshTokenAfter := serverOAuth.Token.Refresh if accessToken == accessTokenAfter { t.Errorf("Access token is the same after refresh") @@ -310,11 +310,11 @@ func TestTokenInvalid(t *testing.T) { t.Fatalf("No server found") } - oauth := currentServer.GetOAuth() + serverOAuth := currentServer.GetOAuth() // Override tokens with invalid values - oauth.Token.Access = dummyValue - oauth.Token.Refresh = dummyValue + serverOAuth.Token.Access = dummyValue + serverOAuth.Token.Refresh = dummyValue _, _, configErr = state.GetConfigCustomServer(serverURI, false) @@ -322,11 +322,11 @@ func TestTokenInvalid(t *testing.T) { t.Fatalf("Connect error after invalid: %v", configErr) } - if oauth.Token.Access == dummyValue { + if serverOAuth.Token.Access == dummyValue { t.Errorf("Access token is equal to dummy value: %s", dummyValue) } - if oauth.Token.Refresh == dummyValue { + if serverOAuth.Token.Refresh == dummyValue { t.Errorf("Refresh token is equal to dummy value: %s", dummyValue) } } |
