mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-11 12:50:14 +00:00
Ensure testing credentials are labeled as such
This commit is contained in:
1
test/images/agnhost/porter/README.md
Normal file
1
test/images/agnhost/porter/README.md
Normal file
@@ -0,0 +1 @@
|
||||
Keys in this directory are generated for testing purposes only.
|
||||
@@ -3,3 +3,7 @@
|
||||
* The container needs to run with docker --privileged
|
||||
|
||||
block.tar.gz is a small ext2 filesystem created by `create_block.sh` (run as root!)
|
||||
|
||||
# Credentials
|
||||
|
||||
Credentials in this directory are generated for testing purposes only.
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -55,7 +55,7 @@ import (
|
||||
|
||||
const (
|
||||
rootUserName = "root"
|
||||
rootToken = "root-user-token"
|
||||
rootToken = "root-user-token" // Fake value for testing.
|
||||
|
||||
readOnlyServiceAccountName = "ro"
|
||||
readWriteServiceAccountName = "rw"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user