Ensure testing credentials are labeled as such

This commit is contained in:
Tim Allclair
2020-02-04 10:36:05 -08:00
parent 4b29407945
commit 9d3670f358
32 changed files with 57 additions and 28 deletions

View File

@@ -45,7 +45,7 @@ func TestDockerKeyringFromGoogleDockerConfigMetadata(t *testing.T) {
registryURL := "hello.kubernetes.io"
email := "foo@bar.baz"
username := "foo"
password := "bar"
password := "bar" // Fake value for testing.
auth := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", username, password)))
sampleDockerConfig := fmt.Sprintf(`{
"https://%s": {
@@ -118,7 +118,7 @@ func TestDockerKeyringFromGoogleDockerConfigMetadataUrl(t *testing.T) {
registryURL := "hello.kubernetes.io"
email := "foo@bar.baz"
username := "foo"
password := "bar"
password := "bar" // Fake value for testing.
auth := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", username, password)))
sampleDockerConfig := fmt.Sprintf(`{
"https://%s": {
@@ -197,7 +197,7 @@ func TestContainerRegistryBasics(t *testing.T) {
for _, registryURL := range registryURLs {
t.Run(registryURL, func(t *testing.T) {
email := "1234@project.gserviceaccount.com"
token := &tokenBlob{AccessToken: "ya26.lots-of-indiscernible-garbage"}
token := &tokenBlob{AccessToken: "ya26.lots-of-indiscernible-garbage"} // Fake value for testing.
const (
serviceAccountsEndpoint = "/computeMetadata/v1/instance/service-accounts/"