From 5fe1e3436474708889fa3b2ed859dd6fc1711f9d Mon Sep 17 00:00:00 2001 From: Vivek Reddy Date: Sat, 12 Oct 2024 15:54:18 -0700 Subject: [PATCH] adding secret logic test Signed-off-by: Vivek Reddy --- test/secret/manager_secret_c3_test.go | 5 +++++ test/secret/manager_secret_m4_test.go | 5 +++++ test/secret/manager_secret_s1_test.go | 10 ++++++++++ test/secret/secret_c3_test.go | 5 +++++ test/secret/secret_m4_test.go | 5 +++++ test/secret/secret_s1_test.go | 10 ++++++++++ 6 files changed, 40 insertions(+) diff --git a/test/secret/manager_secret_c3_test.go b/test/secret/manager_secret_c3_test.go index 1c4740472..dfbfd22c6 100644 --- a/test/secret/manager_secret_c3_test.go +++ b/test/secret/manager_secret_c3_test.go @@ -76,6 +76,11 @@ var _ = Describe("Secret Test for SVA C3", func() { Expect(err).To(Succeed(), "Unable to download license file from Azure") // Create License Config Map testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) + case "gcp": + licenseFilePath, err := testenv.DownloadLicenseFromGCPBucket() + Expect(err).To(Succeed(), "Unable to download license file from S3") + // Create License Config Map + testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) default: fmt.Printf("Unable to download license file") testcaseEnvInst.Log.Info(fmt.Sprintf("Unable to download license file with Cluster Provider set as %v", testenv.ClusterProvider)) diff --git a/test/secret/manager_secret_m4_test.go b/test/secret/manager_secret_m4_test.go index 7e19b60d4..dec4d7851 100644 --- a/test/secret/manager_secret_m4_test.go +++ b/test/secret/manager_secret_m4_test.go @@ -78,6 +78,11 @@ var _ = Describe("Secret Test for M4 SVA", func() { Expect(err).To(Succeed(), "Unable to download license file from Azure") // Create License Config Map testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) + case "gcp": + licenseFilePath, err := testenv.DownloadLicenseFromGCPBucket() + Expect(err).To(Succeed(), "Unable to download license file from S3") + // Create License Config Map + testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) default: fmt.Printf("Unable to download license file") testcaseEnvInst.Log.Info(fmt.Sprintf("Unable to download license file with Cluster Provider set as %v", testenv.ClusterProvider)) diff --git a/test/secret/manager_secret_s1_test.go b/test/secret/manager_secret_s1_test.go index b26afbdb4..1b449a13d 100644 --- a/test/secret/manager_secret_s1_test.go +++ b/test/secret/manager_secret_s1_test.go @@ -78,6 +78,11 @@ var _ = Describe("Secret Test for SVA S1", func() { Expect(err).To(Succeed(), "Unable to download license file from Azure") // Create License Config Map testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) + case "gcp": + licenseFilePath, err := testenv.DownloadLicenseFromGCPBucket() + Expect(err).To(Succeed(), "Unable to download license file from S3") + // Create License Config Map + testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) default: fmt.Printf("Unable to download license file") testcaseEnvInst.Log.Info(fmt.Sprintf("Unable to download license file with Cluster Provider set as %v", testenv.ClusterProvider)) @@ -180,6 +185,11 @@ var _ = Describe("Secret Test for SVA S1", func() { Expect(err).To(Succeed(), "Unable to download license file from Azure") // Create License Config Map testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) + case "gcp": + licenseFilePath, err := testenv.DownloadLicenseFromGCPBucket() + Expect(err).To(Succeed(), "Unable to download license file from S3") + // Create License Config Map + testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) default: fmt.Printf("Unable to download license file") testcaseEnvInst.Log.Info(fmt.Sprintf("Unable to download license file with Cluster Provider set as %v", testenv.ClusterProvider)) diff --git a/test/secret/secret_c3_test.go b/test/secret/secret_c3_test.go index 2375deb5a..4a6a124f5 100644 --- a/test/secret/secret_c3_test.go +++ b/test/secret/secret_c3_test.go @@ -76,6 +76,11 @@ var _ = Describe("Secret Test for SVA C3", func() { Expect(err).To(Succeed(), "Unable to download license file from Azure") // Create License Config Map testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) + case "gcp": + licenseFilePath, err := testenv.DownloadLicenseFromGCPBucket() + Expect(err).To(Succeed(), "Unable to download license file from S3") + // Create License Config Map + testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) default: fmt.Printf("Unable to download license file") testcaseEnvInst.Log.Info(fmt.Sprintf("Unable to download license file with Cluster Provider set as %v", testenv.ClusterProvider)) diff --git a/test/secret/secret_m4_test.go b/test/secret/secret_m4_test.go index a56bc7ced..f3782069d 100644 --- a/test/secret/secret_m4_test.go +++ b/test/secret/secret_m4_test.go @@ -79,6 +79,11 @@ var _ = Describe("Secret Test for M4 SVA", func() { Expect(err).To(Succeed(), "Unable to download license file from Azure") // Create License Config Map testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) + case "gcp": + licenseFilePath, err := testenv.DownloadLicenseFromGCPBucket() + Expect(err).To(Succeed(), "Unable to download license file from S3") + // Create License Config Map + testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) default: fmt.Printf("Unable to download license file") testcaseEnvInst.Log.Info(fmt.Sprintf("Unable to download license file with Cluster Provider set as %v", testenv.ClusterProvider)) diff --git a/test/secret/secret_s1_test.go b/test/secret/secret_s1_test.go index 4e2dd919f..8adfa6086 100644 --- a/test/secret/secret_s1_test.go +++ b/test/secret/secret_s1_test.go @@ -78,6 +78,11 @@ var _ = Describe("Secret Test for SVA S1", func() { Expect(err).To(Succeed(), "Unable to download license file from Azure") // Create License Config Map testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) + case "gcp": + licenseFilePath, err := testenv.DownloadLicenseFromGCPBucket() + Expect(err).To(Succeed(), "Unable to download license file from S3") + // Create License Config Map + testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) default: fmt.Printf("Unable to download license file") testcaseEnvInst.Log.Info(fmt.Sprintf("Unable to download license file with Cluster Provider set as %v", testenv.ClusterProvider)) @@ -180,6 +185,11 @@ var _ = Describe("Secret Test for SVA S1", func() { Expect(err).To(Succeed(), "Unable to download license file from Azure") // Create License Config Map testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) + case "gcp": + licenseFilePath, err := testenv.DownloadLicenseFromGCPBucket() + Expect(err).To(Succeed(), "Unable to download license file from S3") + // Create License Config Map + testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) default: fmt.Printf("Unable to download license file") testcaseEnvInst.Log.Info(fmt.Sprintf("Unable to download license file with Cluster Provider set as %v", testenv.ClusterProvider))