Fix double error of secret negative testcase
E2E Test "Secret should fail to create secret in volume due to empty secret key" tries to create a secret with empty key and check whether it fails or not. But the secret creation in this test fails with double error due to invalid secret name. This will make this test to pass even if the fuctionality which needs to be tested is broken. This commit fix the secret name error(name should not have capital letters) so that the secret creation fails only due to desired reason. Signed-off-by: kanwar saad bin liaqat <kanwar.sbl@gmail.com>
This commit is contained in:
@@ -147,7 +147,7 @@ func newEnvFromSecret(namespace, name string) *v1.Secret {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func createEmptyKeySecretForTest(f *framework.Framework) (*v1.Secret, error) {
|
func createEmptyKeySecretForTest(f *framework.Framework) (*v1.Secret, error) {
|
||||||
secretName := "secret-emptyKey-test-" + string(uuid.NewUUID())
|
secretName := "secret-emptykey-test-" + string(uuid.NewUUID())
|
||||||
secret := &v1.Secret{
|
secret := &v1.Secret{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Namespace: f.Namespace.Name,
|
Namespace: f.Namespace.Name,
|
||||||
|
Reference in New Issue
Block a user