Skip to content

Commit

Permalink
Use creds-cache.json in cache tests
Browse files Browse the repository at this point in the history
To make it more consistent with the real implementation.
  • Loading branch information
tobias-hashicorp committed Oct 27, 2023
1 parent b06d651 commit f3199f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions auth/tokencache/tokensource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestCachingTokenSource_Login_WithoutOauthConfig(t *testing.T) {
require.NoError(err)

// Compile the credential cache path
cacheFile := path.Join(testDirectory, ".config/hcp/credentials.json")
cacheFile := path.Join(testDirectory, ".config/hcp/creds-cache.json")

// Ensure the tests files are cleaned up
defer os.RemoveAll(cacheFile)
Expand Down Expand Up @@ -148,7 +148,7 @@ func TestCachingTokenSource_Login_WithOauthConfig(t *testing.T) {
require.NoError(err)

// Compile the credential cache path
cacheFile := path.Join(testDirectory, ".config/hcp/credentials.json")
cacheFile := path.Join(testDirectory, ".config/hcp/creds-cache.json")

// Ensure the tests files are cleaned up
defer os.RemoveAll(cacheFile)
Expand Down Expand Up @@ -211,7 +211,7 @@ func TestCachingTokenSource_ServicePrincipals(t *testing.T) {
require.NoError(err)

// Compile the credential cache path
cacheFile := path.Join(testDirectory, ".config/hcp/credentials.json")
cacheFile := path.Join(testDirectory, ".config/hcp/creds-cache.json")

// Ensure the tests files are cleaned up
defer os.RemoveAll(cacheFile)
Expand Down Expand Up @@ -281,7 +281,7 @@ func TestCachingTokenSource_Workloads(t *testing.T) {
require.NoError(err)

// Compile the credential cache path
cacheFile := path.Join(testDirectory, ".config/hcp/credentials.json")
cacheFile := path.Join(testDirectory, ".config/hcp/creds-cache.json")

// Ensure the tests files are cleaned up
defer os.RemoveAll(cacheFile)
Expand Down

0 comments on commit f3199f7

Please sign in to comment.