From 3d2f13721af97fdf759c8b079216f9174741cd0d Mon Sep 17 00:00:00 2001 From: Ashley-Joy Date: Wed, 13 Nov 2024 12:25:25 +0000 Subject: [PATCH 1/5] modify values file --- tests/e2e/testfiles/storage_csm_powerflex_alt_vals_2.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_2.yaml b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_2.yaml index 94859ed1b..787d65a5b 100644 --- a/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_2.yaml +++ b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_2.yaml @@ -78,9 +78,9 @@ spec: # Default value: None tolerations: # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint - # - key: "node-role.kubernetes.io/master" - # operator: "Exists" - # effect: "NoSchedule" + - key: "node-role.kubernetes.io/master" + operator: "Exists" + effect: "NoSchedule" # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint - key: "node-role.kubernetes.io/control-plane" operator: "Exists" From 3b0daa5c11c9834df21fe99934612f85c4df966a Mon Sep 17 00:00:00 2001 From: Ashley-Joy Date: Thu, 14 Nov 2024 07:24:58 +0000 Subject: [PATCH 2/5] modify values file --- .../testfiles/storage_csm_powerflex_alt_vals_1.yaml | 12 ++++++------ .../testfiles/storage_csm_powerflex_alt_vals_3.yaml | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_1.yaml b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_1.yaml index c0f6b25b0..7728afd04 100644 --- a/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_1.yaml +++ b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_1.yaml @@ -79,9 +79,9 @@ spec: # Default value: None tolerations: # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint - # - key: "node-role.kubernetes.io/master" - # operator: "Exists" - # effect: "NoSchedule" + - key: "node-role.kubernetes.io/master" + operator: "Exists" + effect: "NoSchedule" # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint - key: "node-role.kubernetes.io/control-plane" operator: "Exists" @@ -137,9 +137,9 @@ spec: # Default value: None tolerations: # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint - # - key: "node-role.kubernetes.io/master" - # operator: "Exists" - # effect: "NoSchedule" + - key: "node-role.kubernetes.io/master" + operator: "Exists" + effect: "NoSchedule" # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint - key: "node-role.kubernetes.io/control-plane" operator: "Exists" diff --git a/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_3.yaml b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_3.yaml index 35ff61a9d..a720950b7 100644 --- a/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_3.yaml +++ b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_3.yaml @@ -136,9 +136,9 @@ spec: # Default value: None tolerations: # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint - # - key: "node-role.kubernetes.io/master" - # operator: "Exists" - # effect: "NoSchedule" + - key: "node-role.kubernetes.io/master" + operator: "Exists" + effect: "NoSchedule" # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint - key: "node-role.kubernetes.io/control-plane" operator: "Exists" From caac21b4e22a910c361a150b987ab7aa65c42858 Mon Sep 17 00:00:00 2001 From: Ashley-Joy Date: Thu, 14 Nov 2024 08:58:19 +0000 Subject: [PATCH 3/5] fix go-sec failure in pr checks --- tests/shared/common.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/shared/common.go b/tests/shared/common.go index 6e598cae1..6b34ae7a0 100644 --- a/tests/shared/common.go +++ b/tests/shared/common.go @@ -13,7 +13,9 @@ package shared import ( + "log" "os" + "path/filepath" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" @@ -172,7 +174,10 @@ func MakeConfigMap(name, ns, _ string) *corev1.ConfigMap { // MakeSecretWithJSON returns a driver pre-req secret array-config func MakeSecretWithJSON(name string, ns string, configFile string) *corev1.Secret { - configJSON, _ := os.ReadFile(configFile) + configJSON, err := os.ReadFile(filepath.Clean(configFile)) + if err != nil { + log.Fatalf("failed to read testdata: %v", err) + } data := map[string][]byte{ "config": configJSON, } From f27277f9e9f28d38c0fe914ce0870bc28f061c14 Mon Sep 17 00:00:00 2001 From: Ashley-Joy Date: Wed, 20 Nov 2024 05:00:03 +0000 Subject: [PATCH 4/5] push changes --- tests/shared/common.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/shared/common.go b/tests/shared/common.go index e21e46f6b..2855cd45f 100644 --- a/tests/shared/common.go +++ b/tests/shared/common.go @@ -13,7 +13,6 @@ package shared import ( - "log" "os" "path/filepath" @@ -174,10 +173,7 @@ func MakeConfigMap(name, ns, _ string) *corev1.ConfigMap { // MakeSecretWithJSON returns a driver pre-req secret array-config func MakeSecretWithJSON(name string, ns string, configFile string) *corev1.Secret { - configJSON, err := os.ReadFile(filepath.Clean(configFile)) // #nosec G304 - if err != nil { - log.Fatalf("failed to read testdata: %v", err) - } + configJSON, _ := os.ReadFile(filepath.Clean(configFile)) // #nosec G304 data := map[string][]byte{ "config": configJSON, } From e4d115fe9b50c2344a827bd0a69f392751b3a879 Mon Sep 17 00:00:00 2001 From: Ashley-Joy Date: Wed, 20 Nov 2024 05:01:54 +0000 Subject: [PATCH 5/5] push changes --- tests/shared/common.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/shared/common.go b/tests/shared/common.go index 2855cd45f..fb0006649 100644 --- a/tests/shared/common.go +++ b/tests/shared/common.go @@ -14,7 +14,6 @@ package shared import ( "os" - "path/filepath" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" @@ -173,7 +172,7 @@ func MakeConfigMap(name, ns, _ string) *corev1.ConfigMap { // MakeSecretWithJSON returns a driver pre-req secret array-config func MakeSecretWithJSON(name string, ns string, configFile string) *corev1.Secret { - configJSON, _ := os.ReadFile(filepath.Clean(configFile)) // #nosec G304 + configJSON, _ := os.ReadFile(configFile) // #nosec G304 data := map[string][]byte{ "config": configJSON, }