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,6 +45,7 @@ import (
func TestNodeAuthorizer(t *testing.T) {
const (
// Define credentials
// Fake values for testing.
tokenMaster = "master-token"
tokenNodeUnknown = "unknown-token"
tokenNode1 = "node1-token"

View File

@@ -54,6 +54,7 @@ import (
)
const (
// Fake values for testing.
AliceToken string = "abc123" // username: alice. Present in token file.
BobToken string = "xyz987" // username: bob. Present in token file.
)

View File

@@ -46,7 +46,7 @@ import (
const (
secretKey = "api_key"
secretVal = "086a7ffc-0225-11e8-ba89-0ed5f89f718b"
secretVal = "086a7ffc-0225-11e8-ba89-0ed5f89f718b" // Fake value for testing.
encryptionConfigFileName = "encryption.conf"
testNamespace = "secret-encryption-test"
testSecret = "test-secret"

View File

@@ -55,7 +55,7 @@ import (
const (
rootUserName = "root"
rootToken = "root-user-token"
rootToken = "root-user-token" // Fake value for testing.
readOnlyServiceAccountName = "ro"
readWriteServiceAccountName = "rw"

View File

@@ -89,7 +89,7 @@ func TestComponentSecureServingAndAuth(t *testing.T) {
}
// authenticate to apiserver via bearer token
token := "flwqkenfjasasdfmwerasd"
token := "flwqkenfjasasdfmwerasd" // Fake token for testing.
tokenFile, err := ioutil.TempFile("", "kubeconfig")
if err != nil {
t.Fatal(err)