From 486a374a0a90693734897c1dd01c4cdcba080a88 Mon Sep 17 00:00:00 2001 From: Vivek Reddy Date: Mon, 28 Oct 2024 15:58:05 -0700 Subject: [PATCH] adding gcp_sanity Signed-off-by: Vivek Reddy --- .../c3/appframework_gcs_suite_test.go | 22 +- .../c3/appframework_gcs_test.go | 1028 ++++++++-------- .../c3/manager_appframework_test.go | 1036 ++++++++--------- .../m4/appframework_gcs_suite_test.go | 22 +- .../m4/appframework_gcs_test.go | 782 ++++++------- .../m4/manager_appframework_test.go | 650 +++++------ .../s1/appframework_gcs_suite_test.go | 22 +- .../s1/appframework_gcs_test.go | 510 ++++---- 8 files changed, 2036 insertions(+), 2036 deletions(-) diff --git a/test/appframework_gcp/c3/appframework_gcs_suite_test.go b/test/appframework_gcp/c3/appframework_gcs_suite_test.go index 67f59fd4a..5cc81af03 100644 --- a/test/appframework_gcp/c3/appframework_gcs_suite_test.go +++ b/test/appframework_gcp/c3/appframework_gcs_suite_test.go @@ -39,11 +39,11 @@ var ( testSuiteName = "c3appfw-" + testenv.RandomDNSName(3) appListV1 []string appListV2 []string - testDataS3Bucket = os.Getenv("TEST_BUCKET") - testS3Bucket = os.Getenv("TEST_INDEXES_S3_BUCKET") - s3AppDirV1 = testenv.AppLocationV1 - s3AppDirV2 = testenv.AppLocationV2 - s3PVTestApps = testenv.PVTestAppsLocation + testDataGcsBucket = os.Getenv("TEST_BUCKET") + testGcsBucket = os.Getenv("TEST_INDEXES_S3_BUCKET") + gcsAppDirV1 = testenv.AppLocationV1 + gcsAppDirV2 = testenv.AppLocationV2 + gcsPVTestApps = testenv.PVTestAppsLocation currDir, _ = os.Getwd() downloadDirV1 = filepath.Join(currDir, "c3appfwV1-"+testenv.RandomDNSName(4)) downloadDirV2 = filepath.Join(currDir, "c3appfwV2-"+testenv.RandomDNSName(4)) @@ -64,20 +64,20 @@ var _ = BeforeSuite(func() { Expect(err).ToNot(HaveOccurred()) if testenv.ClusterProvider == "gcp" { - // Create a list of apps to upload to S3 + // Create a list of apps to upload to Gcs appListV1 = testenv.BasicApps appFileList := testenv.GetAppFileList(appListV1) - // Download V1 Apps from S3 - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + // Download V1 Apps from Gcs + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download V1 app files") - // Create a list of apps to upload to S3 after poll period + // Create a list of apps to upload to Gcs after poll period appListV2 = append(appListV1, testenv.NewAppsAddedBetweenPolls...) appFileList = testenv.GetAppFileList(appListV2) - // Download V2 Apps from S3 - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV2, downloadDirV2, appFileList) + // Download V2 Apps from Gcs + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV2, downloadDirV2, appFileList) Expect(err).To(Succeed(), "Unable to download V2 app files") } else { testenvInstance.Log.Info("Skipping Before Suite Setup", "Cluster Provider", testenv.ClusterProvider) diff --git a/test/appframework_gcp/c3/appframework_gcs_test.go b/test/appframework_gcp/c3/appframework_gcs_test.go index 30814b0ba..66e982e48 100644 --- a/test/appframework_gcp/c3/appframework_gcs_test.go +++ b/test/appframework_gcp/c3/appframework_gcs_test.go @@ -38,12 +38,12 @@ var _ = Describe("c3appfw test", func() { var testcaseEnvInst *testenv.TestCaseEnv var deployment *testenv.Deployment - var s3TestDirShc string - var s3TestDirIdxc string - var s3TestDirShcLocal string - var s3TestDirIdxcLocal string - var s3TestDirShcCluster string - var s3TestDirIdxcCluster string + var gcsTestDirShc string + var gcsTestDirIdxc string + var gcsTestDirShcLocal string + var gcsTestDirIdxcLocal string + var gcsTestDirShcCluster string + var gcsTestDirIdxcCluster string var appSourceNameIdxc string var appSourceNameShc string var uploadedApps []string @@ -75,9 +75,9 @@ var _ = Describe("c3appfw test", func() { Expect(testcaseEnvInst.Teardown()).ToNot(HaveOccurred()) } - // Delete files uploaded to S3 + // Delete files uploaded to GCS if !testcaseEnvInst.SkipTeardown { - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) } if filePresentOnOperator { @@ -93,10 +93,10 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCS for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCS for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Master and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -108,7 +108,7 @@ var _ = Describe("c3appfw test", func() { * Verify bundle push is successful * Verify V1 apps are copied, installed on Monitoring Console and on Search Heads and Indexers pods ############### UPGRADE APPS ################ - * Upload V2 apps on S3 + * Upload V2 apps on GCS * Wait for Monitoring Console and C3 pods to be ready ############ FINAL VERIFICATIONS ############ * Verify Apps are Downloaded in App Deployment Info @@ -121,19 +121,19 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCS for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Monitoring Console", appVersion)) + gcsTestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Prepare Monitoring Console spec with its own app source appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -154,18 +154,18 @@ var _ = Describe("c3appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCS for Indexer Cluster testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Bucket for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCS for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -173,8 +173,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // get revision number of the resource resourceVersion := testenv.GetResourceVersion(ctx, deployment, testcaseEnvInst, mc) @@ -237,32 +237,32 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on GCS + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCS", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // get revision number of the resource resourceVersion = testenv.GetResourceVersion(ctx, deployment, testcaseEnvInst, mc) - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCS for Indexer Cluster appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCS for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Monitoring Console - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + // Upload V2 apps to GCS for Monitoring Console + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -312,10 +312,10 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V2 apps to S3 for Monitoring Console + * Upload V2 apps to GCS for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload V2 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V2 apps to GCS for Indexer Cluster and Search Head Cluster * Create app source for Cluster Master and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ########### INITIAL VERIFICATIONS ########### @@ -327,7 +327,7 @@ var _ = Describe("c3appfw test", func() { * Verify bundle push is successful * Verify V2 apps are copied, installed on Monitoring Console and also on Search Heads and Indexers pods ############## DOWNGRADE APPS ############### - * Upload V1 apps on S3 + * Upload V1 apps on GCS * Wait for Monitoring Console and C3 pods to be ready ########### FINAL VERIFICATIONS ############# * Verify Apps are Downloaded in App Deployment Info @@ -340,19 +340,19 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Upload V2 apps to S3 for Monitoring Console + // Upload V2 apps to GCS for Monitoring Console appVersion := "V2" appFileList := testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Monitoring Console", appVersion)) + gcsTestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for Monitoring Console appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) // Monitoring Console AppFramework Spec mcSpec := enterpriseApi.MonitoringConsoleSpec{ @@ -374,18 +374,18 @@ var _ = Describe("c3appfw test", func() { // Verify Monitoring Console is Ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V2 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V2 apps to GCS for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCS for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -393,8 +393,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc := "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // get revision number of the resource resourceVersion := testenv.GetResourceVersion(ctx, deployment, testcaseEnvInst, mc) @@ -445,32 +445,32 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############## DOWNGRADE APPS ############### - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on GCS + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCS", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // get revision number of the resource resourceVersion = testenv.GetResourceVersion(ctx, deployment, testcaseEnvInst, mc) - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCS for Indexer Cluster appVersion = "V1" appFileList = testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexers", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexers", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexers", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexers", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCS for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Monitoring Console - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCS for Monitoring Console + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -519,7 +519,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps on S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps on GCS for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Master and Deployer * Prepare and deploy C3 CRD with app config and wait for pods to be ready ########## INITIAL VERIFICATIONS ############ @@ -554,20 +554,20 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP ################## - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCS for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexer Cluster", appVersion)) appFileList := testenv.GetAppFileList(appListV1) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCS for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -575,8 +575,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc := "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -797,7 +797,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 + * Upload V1 apps to GCS * Create app source with local scope for C3 SVA (Cluster Master and Deployer) * Prepare and deploy C3 CRD with app framework and wait for pods to be ready ############# INITIAL VERIFICATIONS ########## @@ -820,20 +820,20 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCS for Indexer Cluster appVersion := "V1" - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCS for Search Head Cluster + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -841,8 +841,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD indexerReplicas := 3 @@ -882,20 +882,20 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete V1 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete V1 apps on GCS + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCS", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 + // Upload V2 apps to GCS appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS", appVersion)) appFileList = testenv.GetAppFileList(appListV2) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -937,7 +937,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### * Split Applist into clusterlist and local list - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster for local and cluster scope + * Upload V1 apps to GCS for Indexer Cluster and Search Head Cluster for local and cluster scope * Create app sources for Cluster Master and Deployer with local and cluster scope * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -949,7 +949,7 @@ var _ = Describe("c3appfw test", func() { * Verify bundle push is successful * Verify V1 apps are copied, installed on Monitoring Console and on Search Heads and Indexers pods ############### UPGRADE APPS ################ - * Upload V2 apps on S3 + * Upload V2 apps on GCS * Wait for all C3 pods to be ready ############ FINAL VERIFICATIONS ############ * Verify Apps are Downloaded in App Deployment Info @@ -967,36 +967,36 @@ var _ = Describe("c3appfw test", func() { appListLocal := appListV1[len(appListV1)/2:] appListCluster := appListV1[:len(appListV1)/2] - // Upload appListLocal list of apps to S3 (to be used for local install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + // Upload appListLocal list of apps to GCS (to be used for local install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for local install (local scope)", appVersion)) - s3TestDirIdxcLocal = "c3appfw-" + testenv.RandomDNSName(4) + gcsTestDirIdxcLocal = "c3appfw-" + testenv.RandomDNSName(4) localappFileList := testenv.GetAppFileList(appListLocal) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install for Indexers", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for local install for Indexers", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for local install (local scope)", appVersion)) - s3TestDirShcLocal = "c3appfw-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install for Search Head Cluster", appVersion)) + gcsTestDirShcLocal = "c3appfw-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for local install for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) + // Upload appListCluster list of apps to GCS (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for cluster-wide install (cluster scope)", appVersion)) - s3TestDirIdxcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) + gcsTestDirIdxcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) clusterappFileList := testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to GCS test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) + // Upload appListCluster list of apps to GCS (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for cluster-wide install (cluster scope)", appVersion)) - s3TestDirShcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + gcsTestDirShcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to GCS test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1011,26 +1011,26 @@ var _ = Describe("c3appfw test", func() { // Create App framework Spec for Cluster master with scope local and append cluster scope - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, s3TestDirIdxcLocal, 60) - volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, gcsTestDirIdxcLocal, 60) + volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecIdxc.VolList = append(appFrameworkSpecIdxc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec := enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameIdxcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, s3TestDirIdxcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, gcsTestDirIdxcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecIdxc.AppSources = append(appFrameworkSpecIdxc.AppSources, appSourceSpecCluster...) // Create App framework Spec for Search head cluster with scope local and append cluster scope - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, s3TestDirShcLocal, 60) - volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, gcsTestDirShcLocal, 60) + volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecShc.VolList = append(appFrameworkSpecShc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec = enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameShcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, s3TestDirShcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, gcsTestDirShcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecShc.AppSources = append(appFrameworkSpecShc.AppSources, appSourceSpecCluster...) // Create Single site Cluster and Search Head Cluster, with App Framework enabled on Cluster Master and Deployer @@ -1073,33 +1073,33 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on GCS + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCS", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // Redefine app lists as LDAP app isn't in V1 apps appListLocal = appListV1[len(appListV1)/2:] appListCluster = appListV1[:len(appListV1)/2] - // Upload appListLocal list of V2 apps to S3 (to be used for local install) + // Upload appListLocal list of V2 apps to GCS (to be used for local install) appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for local install (local scope)", appVersion)) localappFileList = testenv.GetAppFileList(appListLocal) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install for Indexers", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for local install for Indexers", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for local install for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of V2 apps to S3 (to be used for cluster-wide install) + // Upload appListCluster list of V2 apps to GCS (to be used for cluster-wide install) clusterappFileList = testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1148,7 +1148,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### * Split Applist into clusterlist and local list - * Upload V2 apps to S3 for Indexer Cluster and Search Head Cluster for local and cluster scope + * Upload V2 apps to GCS for Indexer Cluster and Search Head Cluster for local and cluster scope * Create app sources for Cluster Master and Deployer with local and cluster scope * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -1160,7 +1160,7 @@ var _ = Describe("c3appfw test", func() { * Verify bundle push is successful * Verify V2 apps are copied, installed on Monitoring Console and on Search Heads and Indexers pods ############### Downgrade APPS ################ - * Upload V1 apps on S3 + * Upload V1 apps on GCS * Wait for all C3 pods to be ready ############ FINAL VERIFICATIONS ############ * Verify Apps are Downloaded in App Deployment Info @@ -1178,34 +1178,34 @@ var _ = Describe("c3appfw test", func() { appListLocal := appListV2[len(appListV2)/2:] appListCluster := appListV2[:len(appListV2)/2] - // Upload appListLocal list of apps to S3 (to be used for local install) for Idxc - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) - s3TestDirIdxcLocal = "c3appfw-" + testenv.RandomDNSName(4) + // Upload appListLocal list of apps to GCS (to be used for local install) for Idxc + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for local install (local scope)", appVersion)) + gcsTestDirIdxcLocal = "c3appfw-" + testenv.RandomDNSName(4) localappFileList := testenv.GetAppFileList(appListLocal) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to S3 test directory", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to GCS test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListLocal list of apps to S3 (to be used for local install) for Shc - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) - s3TestDirShcLocal = "c3appfw-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to S3 test directory", appVersion)) + // Upload appListLocal list of apps to GCS (to be used for local install) for Shc + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for local install (local scope)", appVersion)) + gcsTestDirShcLocal = "c3appfw-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to GCS test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) - s3TestDirIdxcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) + // Upload appListCluster list of apps to GCS (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for cluster-wide install (cluster scope)", appVersion)) + gcsTestDirIdxcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) clusterappFileList := testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to GCS test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) - s3TestDirShcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + // Upload appListCluster list of apps to GCS (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for cluster-wide install (cluster scope)", appVersion)) + gcsTestDirShcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to GCS test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1219,25 +1219,25 @@ var _ = Describe("c3appfw test", func() { appSourceVolumeNameShcCluster := "appframework-test-volume-shc-cluster-" + testenv.RandomDNSName(3) // Create App framework Spec for Cluster manager with scope local and append cluster scope - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, s3TestDirIdxcLocal, 60) - volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, gcsTestDirIdxcLocal, 60) + volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecIdxc.VolList = append(appFrameworkSpecIdxc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec := enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameIdxcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, s3TestDirIdxcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, gcsTestDirIdxcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecIdxc.AppSources = append(appFrameworkSpecIdxc.AppSources, appSourceSpecCluster...) // Create App framework Spec for Search head cluster with scope local and append cluster scope - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, s3TestDirShcLocal, 60) - volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, gcsTestDirShcLocal, 60) + volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecShc.VolList = append(appFrameworkSpecShc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec = enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameShcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, s3TestDirShcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, gcsTestDirShcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecShc.AppSources = append(appFrameworkSpecShc.AppSources, appSourceSpecCluster...) // Create Single site Cluster and Search Head Cluster, with App Framework enabled on Cluster Master and Deployer @@ -1281,33 +1281,33 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############# DOWNGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on GCS + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCS", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // Redefine app lists as LDAP app isn't in V1 apps appListLocal = appListV1[len(appListV1)/2:] appListCluster = appListV1[:len(appListV1)/2] - // Upload appListLocal list of V1 apps to S3 (to be used for local install) + // Upload appListLocal list of V1 apps to GCS (to be used for local install) appVersion = "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for local install (local scope)", appVersion)) localappFileList = testenv.GetAppFileList(appListLocal) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for local install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for local install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of V2 apps to S3 (to be used for cluster-wide install) + // Upload appListCluster list of V2 apps to GCS (to be used for cluster-wide install) clusterappFileList = testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1356,7 +1356,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### * Create App Source for C3 SVA (Cluster Master and Deployer) - * Add more apps than usual on S3 for this test + * Add more apps than usual on GCS for this test * Prepare and deploy C3 CRD with app framework and wait for pods to be ready ############### VERIFICATIONS ############### * Verify Apps are Downloaded in App Deployment Info @@ -1374,25 +1374,25 @@ var _ = Describe("c3appfw test", func() { appFileList := testenv.GetAppFileList(appList) appVersion := "V1" - // Download apps from S3 - testcaseEnvInst.Log.Info("Download bigger amount of apps from S3 for this test") - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + // Download apps from GCS + testcaseEnvInst.Log.Info("Download bigger amount of apps from GCS for this test") + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps files") // Create consolidated list of app files appList = append(appListV1, appList...) appFileList = testenv.GetAppFileList(appList) - // Upload app to S3 for Indexer Cluster - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload apps to S3 test directory for Indexer Cluster") + // Upload app to GCS for Indexer Cluster + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload apps to GCS test directory for Indexer Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload app to S3 for Search Head Cluster - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload apps to S3 test directory for Search Head Cluster") + // Upload app to GCS for Search Head Cluster + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload apps to GCS test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1400,8 +1400,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Create Single site Cluster and Search Head Cluster, with App Framework enabled on Cluster Master and Deployer testcaseEnvInst.Log.Info("Create Single Site Indexer Cluster and Search Head Cluster") @@ -1446,10 +1446,10 @@ var _ = Describe("c3appfw test", func() { It("integration, c3, masterappframeworkc3, appframework: can deploy a C3 SVA with App Framework enabled for manual update", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCS for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload V1 apps to S3 + * Upload V1 apps to GCS * Create app source with manaul poll for M4 SVA (Cluster Master and Deployer) * Prepare and deploy C3 CRD with app framework and wait for pods to be ready ########## INITIAL VERIFICATION ############# @@ -1477,19 +1477,19 @@ var _ = Describe("c3appfw test", func() { */ // ################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCS for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Monitoring Console", appVersion)) + gcsTestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Prepare Monitoring Console spec with its own app source appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 0) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 0) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -1510,16 +1510,16 @@ var _ = Describe("c3appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V1 apps to S3 for Indexer Cluster - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCS for Indexer Cluster + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCS for Search Head Cluster + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1527,8 +1527,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 0) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 0) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 0) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 0) // Create Single site Cluster and Search Head Cluster, with App Framework enabled on Cluster Master and Deployer indexerReplicas := 3 @@ -1572,28 +1572,28 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) // ############### UPGRADE APPS ################ - // Delete V1 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete V1 apps on GCS + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCS", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 for C3 + // Upload V2 apps to GCS for C3 appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Uploading %s apps to S3", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Uploading %s apps to GCS", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Monitoring Console - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + // Upload V2 apps to GCS for Monitoring Console + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1691,7 +1691,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 + * Upload V1 apps to GCS * Create app source with local scope for C3 SVA (Cluster Master and Deployer) * Prepare and deploy C3 CRD with app framework and wait for pods to be ready ############# INITIAL VERIFICATION ########## @@ -1718,20 +1718,20 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCS for Indexer Cluster appVersion := "V1" - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCS for Search Head Cluster + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1739,8 +1739,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 0) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 0) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 0) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 0) // Deploy C3 CRD indexerReplicas := 3 @@ -1779,20 +1779,20 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete V1 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete V1 apps on GCS + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCS", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 + // Upload V2 apps to GCS appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS", appVersion)) appFileList = testenv.GetAppFileList(appListV2) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1875,7 +1875,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### * Split Applist into clusterlist and local list - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster for local and cluster scope + * Upload V1 apps to GCS for Indexer Cluster and Search Head Cluster for local and cluster scope * Create app sources for Cluster Master and Deployer with local and cluster scope * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -1887,7 +1887,7 @@ var _ = Describe("c3appfw test", func() { * Verify bundle push is successful * Verify V1 apps are copied, installed on Monitoring Console and on Search Heads and Indexers pods ############### UPGRADE APPS ################ - * Upload V2 apps on S3 + * Upload V2 apps on GCS * Wait for all C3 pods to be ready ############ FINAL VERIFICATIONS ############ * Verify Apps are Downloaded in App Deployment Info @@ -1905,34 +1905,34 @@ var _ = Describe("c3appfw test", func() { appListLocal := appListV1[len(appListV1)/2:] appListCluster := appListV1[:len(appListV1)/2] - // Upload appListLocal list of apps to S3 (to be used for local install) for Idxc - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) - s3TestDirIdxcLocal = "c3appfw-" + testenv.RandomDNSName(4) + // Upload appListLocal list of apps to GCS (to be used for local install) for Idxc + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for local install (local scope)", appVersion)) + gcsTestDirIdxcLocal = "c3appfw-" + testenv.RandomDNSName(4) localappFileList := testenv.GetAppFileList(appListLocal) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to S3 test directory", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to GCS test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListLocal list of apps to S3 (to be used for local install) for Shc - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) - s3TestDirShcLocal = "c3appfw-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to S3 test directory", appVersion)) + // Upload appListLocal list of apps to GCS (to be used for local install) for Shc + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for local install (local scope)", appVersion)) + gcsTestDirShcLocal = "c3appfw-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to GCS test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) - s3TestDirIdxcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) + // Upload appListCluster list of apps to GCS (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for cluster-wide install (cluster scope)", appVersion)) + gcsTestDirIdxcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) clusterappFileList := testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to GCS test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) - s3TestDirShcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + // Upload appListCluster list of apps to GCS (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for cluster-wide install (cluster scope)", appVersion)) + gcsTestDirShcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to GCS test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1946,25 +1946,25 @@ var _ = Describe("c3appfw test", func() { appSourceVolumeNameShcCluster := "appframework-test-volume-shc-cluster-" + testenv.RandomDNSName(3) // Create App framework Spec for Cluster manager with scope local and append cluster scope - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, s3TestDirIdxcLocal, 0) - volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, gcsTestDirIdxcLocal, 0) + volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecIdxc.VolList = append(appFrameworkSpecIdxc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec := enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameIdxcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, s3TestDirIdxcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, gcsTestDirIdxcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecIdxc.AppSources = append(appFrameworkSpecIdxc.AppSources, appSourceSpecCluster...) // Create App framework Spec for Search head cluster with scope local and append cluster scope - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, s3TestDirShcLocal, 0) - volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, gcsTestDirShcLocal, 0) + volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecShc.VolList = append(appFrameworkSpecShc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec = enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameShcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, s3TestDirShcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, gcsTestDirShcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecShc.AppSources = append(appFrameworkSpecShc.AppSources, appSourceSpecCluster...) // Create Single site Cluster and Search Head Cluster, with App Framework enabled on Cluster Master and Deployer @@ -2006,33 +2006,33 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on GCS + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCS", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // Redefine app lists as LDAP app isn't in V1 apps appListLocal = appListV1[len(appListV1)/2:] appListCluster = appListV1[:len(appListV1)/2] - // Upload appListLocal list of V2 apps to S3 (to be used for local install) + // Upload appListLocal list of V2 apps to GCS (to be used for local install) appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for local install (local scope)", appVersion)) localappFileList = testenv.GetAppFileList(appListLocal) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for local install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for local install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of V2 apps to S3 (to be used for cluster-wide install) + // Upload appListCluster list of V2 apps to GCS (to be used for cluster-wide install) clusterappFileList = testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // ############ ENABLE MANUAL POLL ############ @@ -2098,33 +2098,33 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCS for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload big-size app to S3 for Indexer Cluster and Search Head Cluster + * Upload big-size app to GCS for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Master and Deployer * Prepare and deploy C3 CRD with app framework ############## VERIFICATIONS ################ * Verify app installation is in progress on Cluster Master and Deployer - * Upload more apps from S3 during bigger app install + * Upload more apps from GCS during bigger app install * Wait for polling interval to pass * Verify all apps are installed on Cluster Master and Deployer */ //################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCS for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Monitoring Console", appVersion)) + gcsTestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Prepare Monitoring Console spec with its own app source appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -2145,26 +2145,26 @@ var _ = Describe("c3appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Download all apps from S3 + // Download all apps from GCS appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList = testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload big-size app to S3 for Cluster Master + // Upload big-size app to GCS for Cluster Master appList = testenv.BigSingleApp appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Cluster Manager") - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload big-size app to GCS for Cluster Manager") + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCS test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload big-size app to S3 for Search Head Cluster - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Search Head Cluster") - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Search Head Cluster") + // Upload big-size app to GCS for Search Head Cluster + testcaseEnvInst.Log.Info("Upload big-size app to GCS for Search Head Cluster") + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCS test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2172,8 +2172,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2184,18 +2184,18 @@ var _ = Describe("c3appfw test", func() { // Verify App installation is in progress on Cluster Master testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyComplete) - // Upload more apps to S3 for Cluster Master + // Upload more apps to GCS for Cluster Master appList = testenv.ExtraApps appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload more apps to S3 for Cluster Manager") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload more apps to GCS for Cluster Manager") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCS test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload more apps to S3 for Deployer - testcaseEnvInst.Log.Info("Upload more apps to S3 for Deployer") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Deployer") + // Upload more apps to GCS for Deployer + testcaseEnvInst.Log.Info("Upload more apps to GCS for Deployer") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCS test directory for Deployer") uploadedApps = append(uploadedApps, uploadedFiles...) // Ensure Cluster Master goes to Ready phase @@ -2226,33 +2226,33 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCS for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload big-size app to S3 for Indexer Cluster and Search Head Cluster + * Upload big-size app to GCS for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Master and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ############## VERIFICATIONS ################ * Verify App installation is in progress on Cluster Master and Deployer - * Upload more apps from S3 during bigger app install + * Upload more apps from GCS during bigger app install * Wait for polling interval to pass * Verify all apps are installed on Cluster Master and Deployer */ //################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCS for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Monitoring Console", appVersion)) + gcsTestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Prepare Monitoring Console spec with its own app source appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -2273,26 +2273,26 @@ var _ = Describe("c3appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Download all apps from S3 + // Download all apps from GCS appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList = testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload big-size app to S3 for Cluster Master + // Upload big-size app to GCS for Cluster Master appList = testenv.BigSingleApp appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Cluster Manager") - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload big-size app to GCS for Cluster Manager") + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCS test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload big-size app to S3 for Search Head Cluster - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Search Head Cluster") - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Search Head Cluster") + // Upload big-size app to GCS for Search Head Cluster + testcaseEnvInst.Log.Info("Upload big-size app to GCS for Search Head Cluster") + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCS test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2300,8 +2300,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2312,18 +2312,18 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyComplete) - // Upload more apps to S3 for Cluster Master + // Upload more apps to GCS for Cluster Master appList = testenv.ExtraApps appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload more apps to S3 for Cluster Manager") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload more apps to GCS for Cluster Manager") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCS test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload more apps to S3 for Deployer - testcaseEnvInst.Log.Info("Upload more apps to S3 for Deployer") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Deployer") + // Upload more apps to GCS for Deployer + testcaseEnvInst.Log.Info("Upload more apps to GCS for Deployer") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCS test directory for Deployer") uploadedApps = append(uploadedApps, uploadedFiles...) // Ensure Cluster Master goes to Ready phase @@ -2361,7 +2361,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCS for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Master and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready * While app install is in progress, restart the operator @@ -2376,25 +2376,25 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Download all apps from S3 + // Download all apps from GCS appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCS for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCS for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2402,8 +2402,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2455,7 +2455,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCS for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Master and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready * While app download is in progress, restart the operator @@ -2470,25 +2470,25 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Download all apps from S3 + // Download all apps from GCS appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCS for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCS for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2496,8 +2496,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2549,7 +2549,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCS for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Master and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ######### VERIFICATIONS ############# @@ -2561,25 +2561,25 @@ var _ = Describe("c3appfw test", func() { * Verify bundle push is successful * Verify V1 apps are copied, installed on Monitoring Console and on Search Heads and Indexers pods * Disable the app - * Delete the app from S3 + * Delete the app from GCS * Check for repo state in App Deployment Info */ //################## SETUP #################### appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCS for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCS for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2587,8 +2587,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2622,13 +2622,13 @@ var _ = Describe("c3appfw test", func() { allAppSourceInfo := []testenv.AppSourceInfo{cmAppSourceInfo, shcAppSourceInfo} testenv.AppFrameWorkVerifications(ctx, deployment, testcaseEnvInst, allAppSourceInfo, splunkPodAge, "") - // Verify repo state on App to be disabled to be 1 (i.e app present on S3 bucket) + // Verify repo state on App to be disabled to be 1 (i.e app present on GCS bucket) appName := appListV1[0] appFileName := testenv.GetAppFileList([]string{appName}) testenv.VerifyAppRepoState(ctx, deployment, testcaseEnvInst, cm.Name, cm.Kind, appSourceNameIdxc, 1, appFileName[0]) // Disable the app - testenv.DisableAppsToS3(downloadDirV1, appFileName, s3TestDirIdxc) + testenv.DisableAppsToGCP(downloadDirV1, appFileName, gcsTestDirIdxc) // Check for changes in App phase to determine if next poll has been triggered testenv.WaitforPhaseChange(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileName) @@ -2642,12 +2642,12 @@ var _ = Describe("c3appfw test", func() { // Wait for App state to update after config file change testenv.WaitforAppInstallState(ctx, deployment, testcaseEnvInst, idxcPodNames, testcaseEnvInst.GetName(), appName, "disabled", true) - // Delete the file from S3 - s3Filepath := filepath.Join(s3TestDirIdxc, appFileName[0]) - err = testenv.DeleteFileOnS3(testS3Bucket, s3Filepath) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to delete %s app on S3 test directory", appFileName[0])) + // Delete the file from GCS + gcsFilepath := filepath.Join(gcsTestDirIdxc, appFileName[0]) + err = testenv.DeleteFileOnGCP(testGcsBucket, gcsFilepath) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to delete %s app on GCS test directory", appFileName[0])) - // Verify repo state is set to 2 (i.e app deleted from S3 bucket) + // Verify repo state is set to 2 (i.e app deleted from GCS bucket) testenv.VerifyAppRepoState(ctx, deployment, testcaseEnvInst, cm.Name, cm.Kind, appSourceNameIdxc, 2, appFileName[0]) }) @@ -2658,7 +2658,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCS for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Master and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready * While app download is completed, upload new versions of the apps @@ -2681,25 +2681,25 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Download all apps from S3 + // Download all apps from GCS appVersion := "V1" appListV1 := []string{appListV1[0]} appFileList := testenv.GetAppFileList(appListV1) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps") - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCS for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCS for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2707,8 +2707,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 120) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 120) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 120) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 120) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2720,19 +2720,19 @@ var _ = Describe("c3appfw test", func() { // Verify App Download is in progress on Cluster Master testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyPending) - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCS for Indexer Cluster appVersion = "V2" appListV2 := []string{appListV2[0]} appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCS for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Get Pod age to check for pod resets later @@ -2778,7 +2778,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload 15 apps of 100MB size each to S3 for Indexer Cluster and Search Head Cluster for cluster scope + * Upload 15 apps of 100MB size each to GCS for Indexer Cluster and Search Head Cluster for cluster scope * Create app sources for Cluster Master and Deployer with cluster scope * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -2802,21 +2802,21 @@ var _ = Describe("c3appfw test", func() { appVersion := "V1" appList := testenv.PVTestApps appFileList := testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3PVTestApps, downloadDirPVTestApps, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsPVTestApps, downloadDirPVTestApps, appFileList) Expect(err).To(Succeed(), "Unable to download app files") - // Upload apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc := "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirPVTestApps) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload apps to GCS for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexer Cluster", appVersion)) + gcsTestDirIdxc := "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirPVTestApps) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search head Cluster", appVersion)) - s3TestDirShc := "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirPVTestApps) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload apps to GCS for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search head Cluster", appVersion)) + gcsTestDirShc := "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirPVTestApps) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Maximum apps to be downloaded in parallel @@ -2827,9 +2827,9 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc := "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) appFrameworkSpecIdxc.MaxConcurrentAppDownloads = uint64(maxConcurrentAppDownloads) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) appFrameworkSpecShc.MaxConcurrentAppDownloads = uint64(maxConcurrentAppDownloads) // Deploy C3 CRD @@ -2873,7 +2873,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload big-size app to S3 for Indexer Cluster and Search Head Cluster + * Upload big-size app to GCS for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Master and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready * When app download is complete, delete apps from app directory @@ -2888,25 +2888,25 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Download big size apps from S3 + // Download big size apps from GCS appList := testenv.BigSingleApp appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload big size app to S3 for Indexer Cluster + // Upload big size app to GCS for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info("Upload big size app to S3 for Indexer Cluster") - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big size to S3 test directory for Indexer Cluster") + testcaseEnvInst.Log.Info("Upload big size app to GCS for Indexer Cluster") + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big size to GCS test directory for Indexer Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload big size app to S3 for Search Head Cluster - testcaseEnvInst.Log.Info("Upload big size app to S3 for Search Head Cluster") - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big size to S3 test directory for Search Head Cluster") + // Upload big size app to GCS for Search Head Cluster + testcaseEnvInst.Log.Info("Upload big size app to GCS for Search Head Cluster") + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big size to GCS test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2914,8 +2914,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2971,7 +2971,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCS for Indexer Cluster and Search Head Cluster * Prepare and deploy C3 CRD with app framework * Verify IsDeploymentInProgress is set * Wait for the pods to be ready @@ -2981,18 +2981,18 @@ var _ = Describe("c3appfw test", func() { appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCS for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCS for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -3000,8 +3000,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -3096,7 +3096,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload ES app to S3 + * Upload ES app to GCS * Upload TA add-on app to location for Indexer cluster * Create App Source with 'ScopeClusterWithPreConfig' scope for C3 SVA * Prepare and deploy C3 CRD with app framework and wait for pods to be ready @@ -3104,46 +3104,46 @@ var _ = Describe("c3appfw test", func() { * Verify ES app is installed on Deployer and on Search Heads * Verify TA add-on app is installed on indexers ################## UPGRADE VERIFICATION ############# - * Update ES app on S3 location + * Update ES app on GCS location * Verify updated ES app is installed on Deployer and on Search Heads */ //################## SETUP #################### - // Download ES app from S3 + // Download ES app from GCS appVersion := "V1" - testcaseEnvInst.Log.Info("Download ES app from S3") + testcaseEnvInst.Log.Info("Download ES app from GCS") esApp := []string{"SplunkEnterpriseSecuritySuite"} appFileList := testenv.GetAppFileList(esApp) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) - Expect(err).To(Succeed(), "Unable to download ES app file from S3") + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) + Expect(err).To(Succeed(), "Unable to download ES app file from GCS") - // Download Technology add-on app from S3 - testcaseEnvInst.Log.Info("Download Technology add-on app from S3") + // Download Technology add-on app from GCS + testcaseEnvInst.Log.Info("Download Technology add-on app from GCS") taApp := []string{"Splunk_TA_ForIndexers"} appFileListIdxc := testenv.GetAppFileList(taApp) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileListIdxc) - Expect(err).To(Succeed(), "Unable to download ES app file from S3") + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileListIdxc) + Expect(err).To(Succeed(), "Unable to download ES app file from GCS") - // Create directory for file upload to S3 - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + // Create directory for file upload to GCS + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - // Upload ES app to S3 - testcaseEnvInst.Log.Info("Upload ES app to S3") - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload ES app to S3 test directory") + // Upload ES app to GCS + testcaseEnvInst.Log.Info("Upload ES app to GCS") + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload ES app to GCS test directory") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload Technology add-on apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s Technology add-on app to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileListIdxc, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s Technology add-on app to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload Technology add-on apps to GCS for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s Technology add-on app to GCS for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileListIdxc, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s Technology add-on app to GCS test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for SHC appSourceNameShc = "appframework-shc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopePremiumApps, appSourceNameShc, s3TestDirShc, 180) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopePremiumApps, appSourceNameShc, gcsTestDirShc, 180) appFrameworkSpecShc.AppSources[0].PremiumAppsProps = enterpriseApi.PremiumAppsProps{ Type: enterpriseApi.PremiumAppsTypeEs, EsDefaults: enterpriseApi.EsDefaults{ @@ -3154,7 +3154,7 @@ var _ = Describe("c3appfw test", func() { // Create App framework Spec for Indexer Cluster appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 180) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 180) // Deploy C3 SVA // Deploy the Cluster Master @@ -3224,16 +3224,16 @@ var _ = Describe("c3appfw test", func() { testenv.AppFrameWorkVerifications(ctx, deployment, testcaseEnvInst, allAppSourceInfo, splunkPodAge, "") // //############### UPGRADE APPS ################ - // // Download ES App from S3 + // // Download ES App from GCS // appVersion = "V2" - // testcaseEnvInst.Log.Info("Download updated ES app from S3") - // err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV2, downloadDirV2, appFileList) + // testcaseEnvInst.Log.Info("Download updated ES app from GCS") + // err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV2, downloadDirV2, appFileList) // Expect(err).To(Succeed(), "Unable to download ES app") - // // Upload V2 ES app to S3 for Search Head Cluster - // testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s ES app to S3 for Search Head Cluster", appVersion)) - // uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - // Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s ES app to S3 test directory for Search Head Cluster", appVersion)) + // // Upload V2 ES app to GCS for Search Head Cluster + // testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s ES app to GCS for Search Head Cluster", appVersion)) + // uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + // Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s ES app to GCS test directory for Search Head Cluster", appVersion)) // uploadedApps = append(uploadedApps, uploadedFiles...) // // Check for changes in App phase to determine if next poll has been triggered diff --git a/test/appframework_gcp/c3/manager_appframework_test.go b/test/appframework_gcp/c3/manager_appframework_test.go index dffe18a1a..ed79947e9 100644 --- a/test/appframework_gcp/c3/manager_appframework_test.go +++ b/test/appframework_gcp/c3/manager_appframework_test.go @@ -36,12 +36,12 @@ var _ = Describe("c3appfw test", func() { var testcaseEnvInst *testenv.TestCaseEnv var deployment *testenv.Deployment - var s3TestDirShc string - var s3TestDirIdxc string - var s3TestDirShcLocal string - var s3TestDirIdxcLocal string - var s3TestDirShcCluster string - var s3TestDirIdxcCluster string + var gcsTestDirShc string + var gcsTestDirIdxc string + var gcsTestDirShcLocal string + var gcsTestDirIdxcLocal string + var gcsTestDirShcCluster string + var gcsTestDirIdxcCluster string var appSourceNameIdxc string var appSourceNameShc string var uploadedApps []string @@ -72,9 +72,9 @@ var _ = Describe("c3appfw test", func() { Expect(testcaseEnvInst.Teardown()).ToNot(HaveOccurred()) } - // Delete files uploaded to S3 + // Delete files uploaded to Gcs if !testcaseEnvInst.SkipTeardown { - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) } if filePresentOnOperator { @@ -90,10 +90,10 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to Gcs for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to Gcs for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Manager and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -105,7 +105,7 @@ var _ = Describe("c3appfw test", func() { * Verify bundle push is successful * Verify V1 apps are copied, installed on Monitoring Console and on Search Heads and Indexers pods ############### UPGRADE APPS ################ - * Upload V2 apps on S3 + * Upload V2 apps on Gcs * Wait for Monitoring Console and C3 pods to be ready ############ FINAL VERIFICATIONS ############ * Verify Apps are Downloaded in App Deployment Info @@ -118,19 +118,19 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to Gcs for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Monitoring Console", appVersion)) + gcsTestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Prepare Monitoring Console spec with its own app source appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -151,18 +151,18 @@ var _ = Describe("c3appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to Gcs for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -170,8 +170,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // get revision number of the resource resourceVersion := testenv.GetResourceVersion(ctx, deployment, testcaseEnvInst, mc) @@ -234,32 +234,32 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on Gcs + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on Gcs", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // get revision number of the resource resourceVersion = testenv.GetResourceVersion(ctx, deployment, testcaseEnvInst, mc) - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to Gcs for Indexer Cluster appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Monitoring Console - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + // Upload V2 apps to Gcs for Monitoring Console + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -313,8 +313,8 @@ var _ = Describe("c3appfw test", func() { downloadDir := "licenseFolder" switch testenv.ClusterProvider { case "eks": - licenseFilePath, err := testenv.DownloadLicenseFromS3Bucket() - Expect(err).To(Succeed(), "Unable to download license file from S3") + licenseFilePath, err := testenv.DownloadLicenseFromGCPBucket() + Expect(err).To(Succeed(), "Unable to download license file from Gcs") // Create License Config Map testcaseEnvInst.CreateLicenseConfigMap(licenseFilePath) case "azure": @@ -332,7 +332,7 @@ var _ = Describe("c3appfw test", func() { testcaseEnvInst.Log.Info(fmt.Sprintf("Unable to download license file with Cluster Provider set as %v", testenv.ClusterProvider)) } - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to Gcs for Monitoring Console oldImage := "Refer to RELATED_SPLUNK_IMAGE_ENTERPRISE" newImage := "splunk/splunk:latest" @@ -455,10 +455,10 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V2 apps to S3 for Monitoring Console + * Upload V2 apps to Gcs for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload V2 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V2 apps to Gcs for Indexer Cluster and Search Head Cluster * Create app source for Cluster Manager and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ########### INITIAL VERIFICATIONS ########### @@ -470,7 +470,7 @@ var _ = Describe("c3appfw test", func() { * Verify bundle push is successful * Verify V2 apps are copied, installed on Monitoring Console and also on Search Heads and Indexers pods ############## DOWNGRADE APPS ############### - * Upload V1 apps on S3 + * Upload V1 apps on Gcs * Wait for Monitoring Console and C3 pods to be ready ########### FINAL VERIFICATIONS ############# * Verify Apps are Downloaded in App Deployment Info @@ -483,19 +483,19 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Upload V2 apps to S3 for Monitoring Console + // Upload V2 apps to Gcs for Monitoring Console appVersion := "V2" appFileList := testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Monitoring Console", appVersion)) + gcsTestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for Monitoring Console appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) // Monitoring Console AppFramework Spec mcSpec := enterpriseApi.MonitoringConsoleSpec{ @@ -517,18 +517,18 @@ var _ = Describe("c3appfw test", func() { // Verify Monitoring Console is Ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V2 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V2 apps to Gcs for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -536,8 +536,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc := "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // get revision number of the resource resourceVersion := testenv.GetResourceVersion(ctx, deployment, testcaseEnvInst, mc) @@ -588,32 +588,32 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############## DOWNGRADE APPS ############### - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on Gcs + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on Gcs", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // get revision number of the resource resourceVersion = testenv.GetResourceVersion(ctx, deployment, testcaseEnvInst, mc) - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to Gcs for Indexer Cluster appVersion = "V1" appFileList = testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexers", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexers", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexers", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexers", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Monitoring Console - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + // Upload V1 apps to Gcs for Monitoring Console + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -662,7 +662,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps on S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps on Gcs for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Manager and Deployer * Prepare and deploy C3 CRD with app config and wait for pods to be ready ########## INITIAL VERIFICATIONS ############ @@ -697,20 +697,20 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP ################## - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to Gcs for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) appFileList := testenv.GetAppFileList(appListV1) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -718,8 +718,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc := "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -940,7 +940,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 + * Upload V1 apps to Gcs * Create app source with local scope for C3 SVA (Cluster Manager and Deployer) * Prepare and deploy C3 CRD with app framework and wait for pods to be ready ############# INITIAL VERIFICATIONS ########## @@ -963,20 +963,20 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to Gcs for Indexer Cluster appVersion := "V1" - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to Gcs for Search Head Cluster + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -984,8 +984,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD indexerReplicas := 3 @@ -1025,20 +1025,20 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete V1 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete V1 apps on Gcs + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on Gcs", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 + // Upload V2 apps to Gcs appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs", appVersion)) appFileList = testenv.GetAppFileList(appListV2) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1080,7 +1080,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### * Split Applist into clusterlist and local list - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster for local and cluster scope + * Upload V1 apps to Gcs for Indexer Cluster and Search Head Cluster for local and cluster scope * Create app sources for Cluster Manager and Deployer with local and cluster scope * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -1092,7 +1092,7 @@ var _ = Describe("c3appfw test", func() { * Verify bundle push is successful * Verify V1 apps are copied, installed on Monitoring Console and on Search Heads and Indexers pods ############### UPGRADE APPS ################ - * Upload V2 apps on S3 + * Upload V2 apps on Gcs * Wait for all C3 pods to be ready ############ FINAL VERIFICATIONS ############ * Verify Apps are Downloaded in App Deployment Info @@ -1110,36 +1110,36 @@ var _ = Describe("c3appfw test", func() { appListLocal := appListV1[len(appListV1)/2:] appListCluster := appListV1[:len(appListV1)/2] - // Upload appListLocal list of apps to S3 (to be used for local install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + // Upload appListLocal list of apps to Gcs (to be used for local install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for local install (local scope)", appVersion)) - s3TestDirIdxcLocal = "c3appfw-" + testenv.RandomDNSName(4) + gcsTestDirIdxcLocal = "c3appfw-" + testenv.RandomDNSName(4) localappFileList := testenv.GetAppFileList(appListLocal) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install for Indexers", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for local install for Indexers", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for local install (local scope)", appVersion)) - s3TestDirShcLocal = "c3appfw-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install for Search Head Cluster", appVersion)) + gcsTestDirShcLocal = "c3appfw-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for local install for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) + // Upload appListCluster list of apps to Gcs (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for cluster-wide install (cluster scope)", appVersion)) - s3TestDirIdxcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) + gcsTestDirIdxcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) clusterappFileList := testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to Gcs test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) + // Upload appListCluster list of apps to Gcs (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for cluster-wide install (cluster scope)", appVersion)) - s3TestDirShcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + gcsTestDirShcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to Gcs test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1154,26 +1154,26 @@ var _ = Describe("c3appfw test", func() { // Create App framework Spec for Cluster manager with scope local and append cluster scope - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, s3TestDirIdxcLocal, 60) - volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, gcsTestDirIdxcLocal, 60) + volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecIdxc.VolList = append(appFrameworkSpecIdxc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec := enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameIdxcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, s3TestDirIdxcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, gcsTestDirIdxcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecIdxc.AppSources = append(appFrameworkSpecIdxc.AppSources, appSourceSpecCluster...) // Create App framework Spec for Search head cluster with scope local and append cluster scope - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, s3TestDirShcLocal, 60) - volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, gcsTestDirShcLocal, 60) + volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecShc.VolList = append(appFrameworkSpecShc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec = enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameShcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, s3TestDirShcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, gcsTestDirShcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecShc.AppSources = append(appFrameworkSpecShc.AppSources, appSourceSpecCluster...) // Create Single site Cluster and Search Head Cluster, with App Framework enabled on Cluster Manager and Deployer @@ -1216,33 +1216,33 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on Gcs + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on Gcs", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // Redefine app lists as LDAP app isn't in V1 apps appListLocal = appListV1[len(appListV1)/2:] appListCluster = appListV1[:len(appListV1)/2] - // Upload appListLocal list of V2 apps to S3 (to be used for local install) + // Upload appListLocal list of V2 apps to Gcs (to be used for local install) appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for local install (local scope)", appVersion)) localappFileList = testenv.GetAppFileList(appListLocal) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install for Indexers", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for local install for Indexers", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for local install for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of V2 apps to S3 (to be used for cluster-wide install) + // Upload appListCluster list of V2 apps to Gcs (to be used for cluster-wide install) clusterappFileList = testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1291,7 +1291,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### * Split Applist into clusterlist and local list - * Upload V2 apps to S3 for Indexer Cluster and Search Head Cluster for local and cluster scope + * Upload V2 apps to Gcs for Indexer Cluster and Search Head Cluster for local and cluster scope * Create app sources for Cluster Manager and Deployer with local and cluster scope * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -1303,7 +1303,7 @@ var _ = Describe("c3appfw test", func() { * Verify bundle push is successful * Verify V2 apps are copied, installed on Monitoring Console and on Search Heads and Indexers pods ############### Downgrade APPS ################ - * Upload V1 apps on S3 + * Upload V1 apps on Gcs * Wait for all C3 pods to be ready ############ FINAL VERIFICATIONS ############ * Verify Apps are Downloaded in App Deployment Info @@ -1321,34 +1321,34 @@ var _ = Describe("c3appfw test", func() { appListLocal := appListV2[len(appListV2)/2:] appListCluster := appListV2[:len(appListV2)/2] - // Upload appListLocal list of apps to S3 (to be used for local install) for Idxc - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) - s3TestDirIdxcLocal = "c3appfw-" + testenv.RandomDNSName(4) + // Upload appListLocal list of apps to Gcs (to be used for local install) for Idxc + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for local install (local scope)", appVersion)) + gcsTestDirIdxcLocal = "c3appfw-" + testenv.RandomDNSName(4) localappFileList := testenv.GetAppFileList(appListLocal) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to S3 test directory", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to Gcs test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListLocal list of apps to S3 (to be used for local install) for Shc - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) - s3TestDirShcLocal = "c3appfw-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to S3 test directory", appVersion)) + // Upload appListLocal list of apps to Gcs (to be used for local install) for Shc + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for local install (local scope)", appVersion)) + gcsTestDirShcLocal = "c3appfw-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to Gcs test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) - s3TestDirIdxcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) + // Upload appListCluster list of apps to Gcs (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for cluster-wide install (cluster scope)", appVersion)) + gcsTestDirIdxcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) clusterappFileList := testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to Gcs test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) - s3TestDirShcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + // Upload appListCluster list of apps to Gcs (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for cluster-wide install (cluster scope)", appVersion)) + gcsTestDirShcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to Gcs test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1362,25 +1362,25 @@ var _ = Describe("c3appfw test", func() { appSourceVolumeNameShcCluster := "appframework-test-volume-shc-cluster-" + testenv.RandomDNSName(3) // Create App framework Spec for Cluster manager with scope local and append cluster scope - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, s3TestDirIdxcLocal, 60) - volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, gcsTestDirIdxcLocal, 60) + volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecIdxc.VolList = append(appFrameworkSpecIdxc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec := enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameIdxcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, s3TestDirIdxcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, gcsTestDirIdxcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecIdxc.AppSources = append(appFrameworkSpecIdxc.AppSources, appSourceSpecCluster...) // Create App framework Spec for Search head cluster with scope local and append cluster scope - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, s3TestDirShcLocal, 60) - volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, gcsTestDirShcLocal, 60) + volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecShc.VolList = append(appFrameworkSpecShc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec = enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameShcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, s3TestDirShcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, gcsTestDirShcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecShc.AppSources = append(appFrameworkSpecShc.AppSources, appSourceSpecCluster...) // Create Single site Cluster and Search Head Cluster, with App Framework enabled on Cluster Manager and Deployer @@ -1424,33 +1424,33 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############# DOWNGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on Gcs + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on Gcs", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // Redefine app lists as LDAP app isn't in V1 apps appListLocal = appListV1[len(appListV1)/2:] appListCluster = appListV1[:len(appListV1)/2] - // Upload appListLocal list of V1 apps to S3 (to be used for local install) + // Upload appListLocal list of V1 apps to Gcs (to be used for local install) appVersion = "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for local install (local scope)", appVersion)) localappFileList = testenv.GetAppFileList(appListLocal) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for local install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for local install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of V2 apps to S3 (to be used for cluster-wide install) + // Upload appListCluster list of V2 apps to Gcs (to be used for cluster-wide install) clusterappFileList = testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1499,7 +1499,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### * Create App Source for C3 SVA (Cluster Manager and Deployer) - * Add more apps than usual on S3 for this test + * Add more apps than usual on Gcs for this test * Prepare and deploy C3 CRD with app framework and wait for pods to be ready ############### VERIFICATIONS ############### * Verify Apps are Downloaded in App Deployment Info @@ -1517,25 +1517,25 @@ var _ = Describe("c3appfw test", func() { appFileList := testenv.GetAppFileList(appList) appVersion := "V1" - // Download apps from S3 - testcaseEnvInst.Log.Info("Download bigger amount of apps from S3 for this test") - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + // Download apps from Gcs + testcaseEnvInst.Log.Info("Download bigger amount of apps from Gcs for this test") + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps files") // Create consolidated list of app files appList = append(appListV1, appList...) appFileList = testenv.GetAppFileList(appList) - // Upload app to S3 for Indexer Cluster - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload apps to S3 test directory for Indexer Cluster") + // Upload app to Gcs for Indexer Cluster + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload apps to Gcs test directory for Indexer Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload app to S3 for Search Head Cluster - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload apps to S3 test directory for Search Head Cluster") + // Upload app to Gcs for Search Head Cluster + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload apps to Gcs test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1543,8 +1543,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Create Single site Cluster and Search Head Cluster, with App Framework enabled on Cluster Manager and Deployer testcaseEnvInst.Log.Info("Create Single Site Indexer Cluster and Search Head Cluster") @@ -1589,10 +1589,10 @@ var _ = Describe("c3appfw test", func() { It("integration, c3, managerappframeworkc3, appframework: can deploy a C3 SVA with App Framework enabled for manual update", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to Gcs for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload V1 apps to S3 + * Upload V1 apps to Gcs * Create app source with manaul poll for M4 SVA (Cluster Manager and Deployer) * Prepare and deploy C3 CRD with app framework and wait for pods to be ready ########## INITIAL VERIFICATION ############# @@ -1620,19 +1620,19 @@ var _ = Describe("c3appfw test", func() { */ // ################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to Gcs for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Monitoring Console", appVersion)) + gcsTestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Prepare Monitoring Console spec with its own app source appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 0) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 0) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -1653,16 +1653,16 @@ var _ = Describe("c3appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V1 apps to S3 for Indexer Cluster - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to Gcs for Indexer Cluster + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to Gcs for Search Head Cluster + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1670,8 +1670,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 0) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 0) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 0) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 0) // Create Single site Cluster and Search Head Cluster, with App Framework enabled on Cluster Manager and Deployer indexerReplicas := 3 @@ -1715,28 +1715,28 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) // ############### UPGRADE APPS ################ - // Delete V1 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete V1 apps on Gcs + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on Gcs", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 for C3 + // Upload V2 apps to Gcs for C3 appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Uploading %s apps to S3", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Uploading %s apps to Gcs", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Monitoring Console - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + // Upload V2 apps to Gcs for Monitoring Console + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1834,7 +1834,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 + * Upload V1 apps to Gcs * Create app source with local scope for C3 SVA (Cluster Manager and Deployer) * Prepare and deploy C3 CRD with app framework and wait for pods to be ready ############# INITIAL VERIFICATION ########## @@ -1861,20 +1861,20 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to Gcs for Indexer Cluster appVersion := "V1" - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to Gcs for Search Head Cluster + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1882,8 +1882,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 0) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 0) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 0) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 0) // Deploy C3 CRD indexerReplicas := 3 @@ -1922,20 +1922,20 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete V1 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete V1 apps on Gcs + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on Gcs", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 + // Upload V2 apps to Gcs appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs", appVersion)) appFileList = testenv.GetAppFileList(appListV2) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -2018,7 +2018,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### * Split Applist into clusterlist and local list - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster for local and cluster scope + * Upload V1 apps to Gcs for Indexer Cluster and Search Head Cluster for local and cluster scope * Create app sources for Cluster Manager and Deployer with local and cluster scope * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -2030,7 +2030,7 @@ var _ = Describe("c3appfw test", func() { * Verify bundle push is successful * Verify V1 apps are copied, installed on Monitoring Console and on Search Heads and Indexers pods ############### UPGRADE APPS ################ - * Upload V2 apps on S3 + * Upload V2 apps on Gcs * Wait for all C3 pods to be ready ############ FINAL VERIFICATIONS ############ * Verify Apps are Downloaded in App Deployment Info @@ -2048,34 +2048,34 @@ var _ = Describe("c3appfw test", func() { appListLocal := appListV1[len(appListV1)/2:] appListCluster := appListV1[:len(appListV1)/2] - // Upload appListLocal list of apps to S3 (to be used for local install) for Idxc - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) - s3TestDirIdxcLocal = "c3appfw-" + testenv.RandomDNSName(4) + // Upload appListLocal list of apps to Gcs (to be used for local install) for Idxc + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for local install (local scope)", appVersion)) + gcsTestDirIdxcLocal = "c3appfw-" + testenv.RandomDNSName(4) localappFileList := testenv.GetAppFileList(appListLocal) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to S3 test directory", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to Gcs test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListLocal list of apps to S3 (to be used for local install) for Shc - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) - s3TestDirShcLocal = "c3appfw-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to S3 test directory", appVersion)) + // Upload appListLocal list of apps to Gcs (to be used for local install) for Shc + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for local install (local scope)", appVersion)) + gcsTestDirShcLocal = "c3appfw-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to Gcs test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) - s3TestDirIdxcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) + // Upload appListCluster list of apps to Gcs (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for cluster-wide install (cluster scope)", appVersion)) + gcsTestDirIdxcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) clusterappFileList := testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to Gcs test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) - s3TestDirShcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + // Upload appListCluster list of apps to Gcs (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for cluster-wide install (cluster scope)", appVersion)) + gcsTestDirShcCluster = "c3appfw-cluster-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to Gcs test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -2089,25 +2089,25 @@ var _ = Describe("c3appfw test", func() { appSourceVolumeNameShcCluster := "appframework-test-volume-shc-cluster-" + testenv.RandomDNSName(3) // Create App framework Spec for Cluster manager with scope local and append cluster scope - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, s3TestDirIdxcLocal, 0) - volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, gcsTestDirIdxcLocal, 0) + volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecIdxc.VolList = append(appFrameworkSpecIdxc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec := enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameIdxcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, s3TestDirIdxcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, gcsTestDirIdxcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecIdxc.AppSources = append(appFrameworkSpecIdxc.AppSources, appSourceSpecCluster...) // Create App framework Spec for Search head cluster with scope local and append cluster scope - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, s3TestDirShcLocal, 0) - volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, gcsTestDirShcLocal, 0) + volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecShc.VolList = append(appFrameworkSpecShc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec = enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameShcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, s3TestDirShcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, gcsTestDirShcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecShc.AppSources = append(appFrameworkSpecShc.AppSources, appSourceSpecCluster...) // Create Single site Cluster and Search Head Cluster, with App Framework enabled on Cluster Manager and Deployer @@ -2149,33 +2149,33 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on Gcs + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on Gcs", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // Redefine app lists as LDAP app isn't in V1 apps appListLocal = appListV1[len(appListV1)/2:] appListCluster = appListV1[:len(appListV1)/2] - // Upload appListLocal list of V2 apps to S3 (to be used for local install) + // Upload appListLocal list of V2 apps to Gcs (to be used for local install) appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for local install (local scope)", appVersion)) localappFileList = testenv.GetAppFileList(appListLocal) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for local install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for local install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of V2 apps to S3 (to be used for cluster-wide install) + // Upload appListCluster list of V2 apps to Gcs (to be used for cluster-wide install) clusterappFileList = testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // ############ ENABLE MANUAL POLL ############ @@ -2241,33 +2241,33 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to Gcs for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload big-size app to S3 for Indexer Cluster and Search Head Cluster + * Upload big-size app to Gcs for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Manager and Deployer * Prepare and deploy C3 CRD with app framework ############## VERIFICATIONS ################ * Verify app installation is in progress on Cluster Manager and Deployer - * Upload more apps from S3 during bigger app install + * Upload more apps from Gcs during bigger app install * Wait for polling interval to pass * Verify all apps are installed on Cluster Manager and Deployer */ //################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to Gcs for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Monitoring Console", appVersion)) + gcsTestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Prepare Monitoring Console spec with its own app source appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -2288,26 +2288,26 @@ var _ = Describe("c3appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Download all apps from S3 + // Download all apps from Gcs appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList = testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload big-size app to S3 for Cluster Manager + // Upload big-size app to Gcs for Cluster Manager appList = testenv.BigSingleApp appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Cluster Manager") - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload big-size app to Gcs for Cluster Manager") + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to Gcs test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload big-size app to S3 for Search Head Cluster - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Search Head Cluster") - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Search Head Cluster") + // Upload big-size app to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info("Upload big-size app to Gcs for Search Head Cluster") + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to Gcs test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2315,8 +2315,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2327,18 +2327,18 @@ var _ = Describe("c3appfw test", func() { // Verify App installation is in progress on Cluster Manager testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyComplete) - // Upload more apps to S3 for Cluster Manager + // Upload more apps to Gcs for Cluster Manager appList = testenv.ExtraApps appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload more apps to S3 for Cluster Manager") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload more apps to Gcs for Cluster Manager") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to Gcs test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload more apps to S3 for Deployer - testcaseEnvInst.Log.Info("Upload more apps to S3 for Deployer") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Deployer") + // Upload more apps to Gcs for Deployer + testcaseEnvInst.Log.Info("Upload more apps to Gcs for Deployer") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to Gcs test directory for Deployer") uploadedApps = append(uploadedApps, uploadedFiles...) // Ensure Cluster Manager goes to Ready phase @@ -2369,33 +2369,33 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to Gcs for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload big-size app to S3 for Indexer Cluster and Search Head Cluster + * Upload big-size app to Gcs for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Manager and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ############## VERIFICATIONS ################ * Verify App installation is in progress on Cluster Manager and Deployer - * Upload more apps from S3 during bigger app install + * Upload more apps from Gcs during bigger app install * Wait for polling interval to pass * Verify all apps are installed on Cluster Manager and Deployer */ //################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to Gcs for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Monitoring Console", appVersion)) + gcsTestDirMC := "c3appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Prepare Monitoring Console spec with its own app source appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -2416,26 +2416,26 @@ var _ = Describe("c3appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Download all apps from S3 + // Download all apps from Gcs appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList = testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload big-size app to S3 for Cluster Manager + // Upload big-size app to Gcs for Cluster Manager appList = testenv.BigSingleApp appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Cluster Manager") - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload big-size app to Gcs for Cluster Manager") + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to Gcs test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload big-size app to S3 for Search Head Cluster - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Search Head Cluster") - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Search Head Cluster") + // Upload big-size app to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info("Upload big-size app to Gcs for Search Head Cluster") + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to Gcs test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2443,8 +2443,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2455,18 +2455,18 @@ var _ = Describe("c3appfw test", func() { testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyComplete) - // Upload more apps to S3 for Cluster Manager + // Upload more apps to Gcs for Cluster Manager appList = testenv.ExtraApps appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload more apps to S3 for Cluster Manager") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload more apps to Gcs for Cluster Manager") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to Gcs test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload more apps to S3 for Deployer - testcaseEnvInst.Log.Info("Upload more apps to S3 for Deployer") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Deployer") + // Upload more apps to Gcs for Deployer + testcaseEnvInst.Log.Info("Upload more apps to Gcs for Deployer") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to Gcs test directory for Deployer") uploadedApps = append(uploadedApps, uploadedFiles...) // Ensure Cluster Manager goes to Ready phase @@ -2504,7 +2504,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to Gcs for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Manager and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready * While app install is in progress, restart the operator @@ -2519,25 +2519,25 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Download all apps from S3 + // Download all apps from Gcs appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to Gcs for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2545,8 +2545,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2598,7 +2598,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to Gcs for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Manager and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready * While app download is in progress, restart the operator @@ -2613,25 +2613,25 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Download all apps from S3 + // Download all apps from Gcs appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to Gcs for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2639,8 +2639,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2692,7 +2692,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to Gcs for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Manager and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ######### VERIFICATIONS ############# @@ -2704,25 +2704,25 @@ var _ = Describe("c3appfw test", func() { * Verify bundle push is successful * Verify V1 apps are copied, installed on Monitoring Console and on Search Heads and Indexers pods * Disable the app - * Delete the app from S3 + * Delete the app from Gcs * Check for repo state in App Deployment Info */ //################## SETUP #################### appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to Gcs for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2730,8 +2730,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2765,13 +2765,13 @@ var _ = Describe("c3appfw test", func() { allAppSourceInfo := []testenv.AppSourceInfo{cmAppSourceInfo, shcAppSourceInfo} testenv.AppFrameWorkVerifications(ctx, deployment, testcaseEnvInst, allAppSourceInfo, splunkPodAge, "") - // Verify repo state on App to be disabled to be 1 (i.e app present on S3 bucket) + // Verify repo state on App to be disabled to be 1 (i.e app present on Gcs bucket) appName := appListV1[0] appFileName := testenv.GetAppFileList([]string{appName}) testenv.VerifyAppRepoState(ctx, deployment, testcaseEnvInst, cm.Name, cm.Kind, appSourceNameIdxc, 1, appFileName[0]) // Disable the app - testenv.DisableAppsToS3(downloadDirV1, appFileName, s3TestDirIdxc) + testenv.DisableAppsToGCP(downloadDirV1, appFileName, gcsTestDirIdxc) // Check for changes in App phase to determine if next poll has been triggered testenv.WaitforPhaseChange(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileName) @@ -2785,12 +2785,12 @@ var _ = Describe("c3appfw test", func() { // Wait for App state to update after config file change testenv.WaitforAppInstallState(ctx, deployment, testcaseEnvInst, idxcPodNames, testcaseEnvInst.GetName(), appName, "disabled", true) - // Delete the file from S3 - s3Filepath := filepath.Join(s3TestDirIdxc, appFileName[0]) - err = testenv.DeleteFileOnS3(testS3Bucket, s3Filepath) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to delete %s app on S3 test directory", appFileName[0])) + // Delete the file from Gcs + gcsFilepath := filepath.Join(gcsTestDirIdxc, appFileName[0]) + err = testenv.DeleteFileOnGCP(testGcsBucket, gcsFilepath) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to delete %s app on Gcs test directory", appFileName[0])) - // Verify repo state is set to 2 (i.e app deleted from S3 bucket) + // Verify repo state is set to 2 (i.e app deleted from Gcs bucket) testenv.VerifyAppRepoState(ctx, deployment, testcaseEnvInst, cm.Name, cm.Kind, appSourceNameIdxc, 2, appFileName[0]) }) @@ -2801,7 +2801,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to Gcs for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Manager and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready * While app download is completed, upload new versions of the apps @@ -2824,25 +2824,25 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Download all apps from S3 + // Download all apps from Gcs appVersion := "V1" appListV1 := []string{appListV1[0]} appFileList := testenv.GetAppFileList(appListV1) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps") - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to Gcs for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -2850,8 +2850,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 120) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 120) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 120) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 120) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -2863,19 +2863,19 @@ var _ = Describe("c3appfw test", func() { // Verify App Download is in progress on Cluster Manager testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyPending) - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to Gcs for Indexer Cluster appVersion = "V2" appListV2 := []string{appListV2[0]} appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Get Pod age to check for pod resets later @@ -2921,7 +2921,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload 15 apps of 100MB size each to S3 for Indexer Cluster and Search Head Cluster for cluster scope + * Upload 15 apps of 100MB size each to Gcs for Indexer Cluster and Search Head Cluster for cluster scope * Create app sources for Cluster Master and Deployer with cluster scope * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -2945,21 +2945,21 @@ var _ = Describe("c3appfw test", func() { appVersion := "V1" appList := testenv.PVTestApps appFileList := testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3PVTestApps, downloadDirPVTestApps, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsPVTestApps, downloadDirPVTestApps, appFileList) Expect(err).To(Succeed(), "Unable to download app files") - // Upload apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc := "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirPVTestApps) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload apps to Gcs for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) + gcsTestDirIdxc := "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirPVTestApps) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search head Cluster", appVersion)) - s3TestDirShc := "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirPVTestApps) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload apps to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search head Cluster", appVersion)) + gcsTestDirShc := "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirPVTestApps) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Maximum apps to be downloaded in parallel @@ -2970,9 +2970,9 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc := "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) appFrameworkSpecIdxc.MaxConcurrentAppDownloads = uint64(maxConcurrentAppDownloads) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) appFrameworkSpecShc.MaxConcurrentAppDownloads = uint64(maxConcurrentAppDownloads) // Deploy C3 CRD @@ -3016,7 +3016,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload big-size app to S3 for Indexer Cluster and Search Head Cluster + * Upload big-size app to Gcs for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Manager and Deployer * Prepare and deploy C3 CRD with app framework and wait for the pods to be ready * When app download is complete, delete apps from app directory @@ -3031,25 +3031,25 @@ var _ = Describe("c3appfw test", func() { */ //################## SETUP #################### - // Download big size apps from S3 + // Download big size apps from Gcs appList := testenv.BigSingleApp appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload big size app to S3 for Indexer Cluster + // Upload big size app to Gcs for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info("Upload big size app to S3 for Indexer Cluster") - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big size to S3 test directory for Indexer Cluster") + testcaseEnvInst.Log.Info("Upload big size app to Gcs for Indexer Cluster") + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big size to Gcs test directory for Indexer Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload big size app to S3 for Search Head Cluster - testcaseEnvInst.Log.Info("Upload big size app to S3 for Search Head Cluster") - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big size to S3 test directory for Search Head Cluster") + // Upload big size app to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info("Upload big size app to Gcs for Search Head Cluster") + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big size to Gcs test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -3057,8 +3057,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -3114,7 +3114,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to Gcs for Indexer Cluster and Search Head Cluster * Prepare and deploy C3 CRD with app framework * Verify IsDeploymentInProgress is set * Wait for the pods to be ready @@ -3124,18 +3124,18 @@ var _ = Describe("c3appfw test", func() { appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to Gcs for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Indexer Cluster", appVersion)) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to Gcs for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to Gcs for Search Head Cluster", appVersion)) + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to Gcs test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for C3 @@ -3143,8 +3143,8 @@ var _ = Describe("c3appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy C3 CRD testcaseEnvInst.Log.Info("Deploy Single Site Indexer Cluster with Search Head Cluster") @@ -3239,7 +3239,7 @@ var _ = Describe("c3appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload ES app to S3 + * Upload ES app to Gcs * Upload TA add-on app to location for Indexer cluster * Create App Source with 'ScopeClusterWithPreConfig' scope for C3 SVA * Prepare and deploy C3 CRD with app framework and wait for pods to be ready @@ -3247,46 +3247,46 @@ var _ = Describe("c3appfw test", func() { * Verify ES app is installed on Deployer and on Search Heads * Verify TA add-on app is installed on indexers ################## UPGRADE VERIFICATION ############# - * Update ES app on S3 location + * Update ES app on Gcs location * Verify updated ES app is installed on Deployer and on Search Heads */ //################## SETUP #################### - // Download ES app from S3 + // Download ES app from Gcs appVersion := "V1" - testcaseEnvInst.Log.Info("Download ES app from S3") + testcaseEnvInst.Log.Info("Download ES app from Gcs") esApp := []string{"SplunkEnterpriseSecuritySuite"} appFileList := testenv.GetAppFileList(esApp) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) - Expect(err).To(Succeed(), "Unable to download ES app file from S3") + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) + Expect(err).To(Succeed(), "Unable to download ES app file from Gcs") - // Download Technology add-on app from S3 - testcaseEnvInst.Log.Info("Download Technology add-on app from S3") + // Download Technology add-on app from Gcs + testcaseEnvInst.Log.Info("Download Technology add-on app from Gcs") taApp := []string{"Splunk_TA_ForIndexers"} appFileListIdxc := testenv.GetAppFileList(taApp) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileListIdxc) - Expect(err).To(Succeed(), "Unable to download ES app file from S3") + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileListIdxc) + Expect(err).To(Succeed(), "Unable to download ES app file from Gcs") - // Create directory for file upload to S3 - s3TestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) - s3TestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) + // Create directory for file upload to Gcs + gcsTestDirShc = "c3appfw-shc-" + testenv.RandomDNSName(4) + gcsTestDirIdxc = "c3appfw-idxc-" + testenv.RandomDNSName(4) - // Upload ES app to S3 - testcaseEnvInst.Log.Info("Upload ES app to S3") - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload ES app to S3 test directory") + // Upload ES app to Gcs + testcaseEnvInst.Log.Info("Upload ES app to Gcs") + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload ES app to Gcs test directory") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload Technology add-on apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s Technology add-on app to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileListIdxc, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s Technology add-on app to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload Technology add-on apps to Gcs for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s Technology add-on app to Gcs for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileListIdxc, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s Technology add-on app to Gcs test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for SHC appSourceNameShc = "appframework-shc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopePremiumApps, appSourceNameShc, s3TestDirShc, 180) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopePremiumApps, appSourceNameShc, gcsTestDirShc, 180) appFrameworkSpecShc.AppSources[0].PremiumAppsProps = enterpriseApi.PremiumAppsProps{ Type: enterpriseApi.PremiumAppsTypeEs, EsDefaults: enterpriseApi.EsDefaults{ @@ -3297,7 +3297,7 @@ var _ = Describe("c3appfw test", func() { // Create App framework Spec for Indexer Cluster appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 180) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 180) // Deploy C3 SVA // Deploy the Cluster Manager @@ -3367,16 +3367,16 @@ var _ = Describe("c3appfw test", func() { testenv.AppFrameWorkVerifications(ctx, deployment, testcaseEnvInst, allAppSourceInfo, splunkPodAge, "") // //############### UPGRADE APPS ################ - // // Download ES App from S3 + // // Download ES App from Gcs // appVersion = "V2" - // testcaseEnvInst.Log.Info("Download updated ES app from S3") - // err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV2, downloadDirV2, appFileList) + // testcaseEnvInst.Log.Info("Download updated ES app from Gcs") + // err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV2, downloadDirV2, appFileList) // Expect(err).To(Succeed(), "Unable to download ES app") - // // Upload V2 ES app to S3 for Search Head Cluster - // testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s ES app to S3 for Search Head Cluster", appVersion)) - // uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - // Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s ES app to S3 test directory for Search Head Cluster", appVersion)) + // // Upload V2 ES app to Gcs for Search Head Cluster + // testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s ES app to Gcs for Search Head Cluster", appVersion)) + // uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + // Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s ES app to Gcs test directory for Search Head Cluster", appVersion)) // uploadedApps = append(uploadedApps, uploadedFiles...) // // Check for changes in App phase to determine if next poll has been triggered diff --git a/test/appframework_gcp/m4/appframework_gcs_suite_test.go b/test/appframework_gcp/m4/appframework_gcs_suite_test.go index 15cc338e6..f14f97ff6 100644 --- a/test/appframework_gcp/m4/appframework_gcs_suite_test.go +++ b/test/appframework_gcp/m4/appframework_gcs_suite_test.go @@ -39,11 +39,11 @@ var ( testSuiteName = "m4appfw-" + testenv.RandomDNSName(3) appListV1 []string appListV2 []string - testDataS3Bucket = os.Getenv("TEST_BUCKET") - testS3Bucket = os.Getenv("TEST_INDEXES_S3_BUCKET") - s3AppDirV1 = testenv.AppLocationV1 - s3AppDirV2 = testenv.AppLocationV2 - s3PVTestApps = testenv.PVTestAppsLocation + testDataGcsBucket = os.Getenv("TEST_BUCKET") + testGcsBucket = os.Getenv("TEST_INDEXES_S3_BUCKET") + gcsAppDirV1 = testenv.AppLocationV1 + gcsAppDirV2 = testenv.AppLocationV2 + gcsPVTestApps = testenv.PVTestAppsLocation currDir, _ = os.Getwd() downloadDirV1 = filepath.Join(currDir, "m4appfwV1-"+testenv.RandomDNSName(4)) downloadDirV2 = filepath.Join(currDir, "m4appfwV2-"+testenv.RandomDNSName(4)) @@ -64,20 +64,20 @@ var _ = BeforeSuite(func() { Expect(err).ToNot(HaveOccurred()) if testenv.ClusterProvider == "gcp" { - // Create a list of apps to upload to S3 + // Create a list of apps to upload to GCP appListV1 = testenv.BasicApps appFileList := testenv.GetAppFileList(appListV1) - // Download V1 Apps from S3 - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + // Download V1 Apps from GCP + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download V1 app files") - // Create a list of apps to upload to S3 after poll period + // Create a list of apps to upload to GCP after poll period appListV2 = append(appListV1, testenv.NewAppsAddedBetweenPolls...) appFileList = testenv.GetAppFileList(appListV2) - // Download V2 Apps from S3 - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV2, downloadDirV2, appFileList) + // Download V2 Apps from GCP + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV2, downloadDirV2, appFileList) Expect(err).To(Succeed(), "Unable to download V2 app files") } else { testenvInstance.Log.Info("Skipping Before Suite Setup", "Cluster Provider", testenv.ClusterProvider) diff --git a/test/appframework_gcp/m4/appframework_gcs_test.go b/test/appframework_gcp/m4/appframework_gcs_test.go index 40cca84c5..a9819398c 100644 --- a/test/appframework_gcp/m4/appframework_gcs_test.go +++ b/test/appframework_gcp/m4/appframework_gcs_test.go @@ -39,14 +39,14 @@ var _ = Describe("m4appfw test", func() { var uploadedApps []string var appSourceNameIdxc string var appSourceNameShc string - var s3TestDirShc string - var s3TestDirIdxc string + var gcsTestDirShc string + var gcsTestDirIdxc string var appSourceVolumeNameIdxc string var appSourceVolumeNameShc string - var s3TestDirShcLocal string - var s3TestDirIdxcLocal string - var s3TestDirShcCluster string - var s3TestDirIdxcCluster string + var gcsTestDirShcLocal string + var gcsTestDirIdxcLocal string + var gcsTestDirShcCluster string + var gcsTestDirIdxcCluster string var filePresentOnOperator bool ctx := context.TODO() @@ -58,8 +58,8 @@ var _ = Describe("m4appfw test", func() { Expect(err).To(Succeed(), "Unable to create testcaseenv") deployment, err = testcaseEnvInst.NewDeployment(testenv.RandomDNSName(3)) Expect(err).To(Succeed(), "Unable to create deployment") - s3TestDirIdxc = "m4appfw-idxc-" + testenv.RandomDNSName(4) - s3TestDirShc = "m4appfw-shc-" + testenv.RandomDNSName(4) + gcsTestDirIdxc = "m4appfw-idxc-" + testenv.RandomDNSName(4) + gcsTestDirShc = "m4appfw-shc-" + testenv.RandomDNSName(4) appSourceVolumeNameIdxc = "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc = "appframework-test-volume-shc-" + testenv.RandomDNSName(3) }) @@ -72,9 +72,9 @@ var _ = Describe("m4appfw test", func() { if deployment != nil { deployment.Teardown() } - // Delete files uploaded to S3 + // Delete files uploaded to GCP if !testcaseEnvInst.SkipTeardown { - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) } if testcaseEnvInst != nil { Expect(testcaseEnvInst.Teardown()).ToNot(HaveOccurred()) @@ -93,10 +93,10 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCP for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready ########## INITIAL VERIFICATIONS ########## * Verify Apps Downloaded in App Deployment Info @@ -120,19 +120,19 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCP for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) + gcsTestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for Monitoring Console appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) volumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, volumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, volumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -152,23 +152,23 @@ var _ = Describe("m4appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // get revision number of the resource resourceVersion := testenv.GetResourceVersion(ctx, deployment, testcaseEnvInst, mc) @@ -232,32 +232,32 @@ var _ = Describe("m4appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############# UPGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on GCP + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCP", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // get revision number of the resource _ = testenv.GetResourceVersion(ctx, deployment, testcaseEnvInst, mc) - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCP for Indexer Cluster appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Upload V2 apps for Monitoring Console - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -311,10 +311,10 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V2 apps to S3 for Monitoring Console + * Upload V2 apps to GCP for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload V2 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V2 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready ########## INITIAL VERIFICATIONS ########## * Verify Apps Downloaded in App Deployment Info @@ -338,19 +338,19 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Upload V2 version of apps to S3 for Monitoring Console + // Upload V2 version of apps to GCP for Monitoring Console appVersion := "V2" appFileList := testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) + gcsTestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for Monitoring Console appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) volumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, volumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, volumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -370,23 +370,23 @@ var _ = Describe("m4appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V2 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V2 apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy M4 CRD testcaseEnvInst.Log.Info("Deploy Multisite Indexer Cluster with Search Head Cluster") @@ -435,30 +435,30 @@ var _ = Describe("m4appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############# DOWNGRADE APPS ################ - // Delete V2 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) + // Delete V2 apps on GCP + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCP", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion = "V1" appFileList = testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Monitoring Console - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCP for Monitoring Console + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -509,7 +509,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for M4 + * Upload V1 apps to GCP for M4 * Create app source for M4 SVA (Cluster Master and Deployer) * Prepare and deploy M4 CRD with app config and wait for pods to be ready ########### INITIAL VERIFICATIONS ######### @@ -545,25 +545,25 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy M4 CRD testcaseEnvInst.Log.Info("Deploy Multisite Indexer Cluster with Search Head Cluster") @@ -788,7 +788,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 + * Upload V1 apps to GCP * Create app source with local scope for M4 SVA (Cluster Master and Deployer) * Prepare and deploy M4 CRD with app framework and wait for pods to be ready ########## INITIAL VERIFICATION ############# @@ -811,25 +811,25 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 60) // Deploy Multisite Cluster and Search Head Cluster, with App Framework enabled on Cluster Master and Deployer siteCount := 3 @@ -867,23 +867,23 @@ var _ = Describe("m4appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete V1 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete V1 apps on GCP + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCP", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCP for Indexer Cluster appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -920,10 +920,10 @@ var _ = Describe("m4appfw test", func() { It("integration, m4, masterappframeworkm4, appframework: can deploy a M4 SVA with App Framework enabled for manual poll", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCP for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console with app framework and wait for the pod to be ready - * Upload V1 apps to S3 + * Upload V1 apps to GCP * Create app source with manaul poll for M4 SVA (Cluster Master and Deployer) * Prepare and deploy M4 CRD with app framework and wait for pods to be ready ########## INITIAL VERIFICATION ############# @@ -951,19 +951,19 @@ var _ = Describe("m4appfw test", func() { */ // ################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCP for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) + gcsTestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for Monitoring Console appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) volumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, volumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 0) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, volumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 0) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -983,23 +983,23 @@ var _ = Describe("m4appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 0) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 0) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 0) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 0) siteCount := 3 shReplicas := 3 @@ -1047,24 +1047,24 @@ var _ = Describe("m4appfw test", func() { // ############### UPGRADE APPS ################ - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCP for Indexer Cluster appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Monitoring Console - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + // Upload V2 apps to GCP for Monitoring Console + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1175,7 +1175,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 + * Upload V1 apps to GCP * Create app source with local scope for M4 SVA (Cluster Master and Deployer) * Prepare and deploy M4 CRD with app framework and wait for pods to be ready ########## INITIAL VERIFICATION ############# @@ -1202,25 +1202,25 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 0) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 0) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 0) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 0) // Deploy Multisite Cluster and Search Head Cluster, with App Framework enabled on Cluster Master and Deployer siteCount := 3 @@ -1257,23 +1257,23 @@ var _ = Describe("m4appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete V1 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete V1 apps on GCP + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCP", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCP for Indexer Cluster appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1359,7 +1359,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### * Split Applist into clusterlist and local list - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster for local and cluster scope + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster for local and cluster scope * Create app sources for Cluster Master and Deployer with local and cluster scope * Prepare and deploy m4 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -1371,7 +1371,7 @@ var _ = Describe("m4appfw test", func() { * Verify bundle push is successful * Verify V1 apps are copied, installed on Monitoring Console and on Search Heads and Indexers pods ############### UPGRADE APPS ################ - * Upload V2 apps on S3 + * Upload V2 apps on GCP * Wait for all m4 pods to be ready ############ FINAL VERIFICATIONS ############ * Verify Apps are Downloaded in App Deployment Info @@ -1389,34 +1389,34 @@ var _ = Describe("m4appfw test", func() { appListLocal := appListV1[len(appListV1)/2:] appListCluster := appListV1[:len(appListV1)/2] - // Upload appListLocal list of apps to S3 (to be used for local install) for Idxc - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) - s3TestDirIdxcLocal = "m4appfw-" + testenv.RandomDNSName(4) + // Upload appListLocal list of apps to GCP (to be used for local install) for Idxc + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for local install (local scope)", appVersion)) + gcsTestDirIdxcLocal = "m4appfw-" + testenv.RandomDNSName(4) localappFileList := testenv.GetAppFileList(appListLocal) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to S3 test directory", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to GCP test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListLocal list of apps to S3 (to be used for local install) for Shc - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) - s3TestDirShcLocal = "m4appfw-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to S3 test directory", appVersion)) + // Upload appListLocal list of apps to GCP (to be used for local install) for Shc + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for local install (local scope)", appVersion)) + gcsTestDirShcLocal = "m4appfw-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to GCP test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) - s3TestDirIdxcCluster = "m4appfw-cluster-" + testenv.RandomDNSName(4) + // Upload appListCluster list of apps to GCP (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for cluster-wide install (cluster scope)", appVersion)) + gcsTestDirIdxcCluster = "m4appfw-cluster-" + testenv.RandomDNSName(4) clusterappFileList := testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to GCP test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) - s3TestDirShcCluster = "m4appfw-cluster-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + // Upload appListCluster list of apps to GCP (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for cluster-wide install (cluster scope)", appVersion)) + gcsTestDirShcCluster = "m4appfw-cluster-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to GCP test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1431,26 +1431,26 @@ var _ = Describe("m4appfw test", func() { // Create App framework Spec for Cluster master with scope local and append cluster scope - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, s3TestDirIdxcLocal, 0) - volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, gcsTestDirIdxcLocal, 0) + volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecIdxc.VolList = append(appFrameworkSpecIdxc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec := enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameIdxcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, s3TestDirIdxcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterIdxc, gcsTestDirIdxcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecIdxc.AppSources = append(appFrameworkSpecIdxc.AppSources, appSourceSpecCluster...) // Create App framework Spec for Search head cluster with scope local and append cluster scope - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, s3TestDirShcLocal, 0) - volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, gcsTestDirShcLocal, 0) + volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "gcs", testenv.GetDefaultGCPRegion())} appFrameworkSpecShc.VolList = append(appFrameworkSpecShc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec = enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameShcCluster, Scope: enterpriseApi.ScopeCluster, } - appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, s3TestDirShcCluster, appSourceClusterDefaultSpec)} + appSourceSpecCluster = []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceNameClusterShc, gcsTestDirShcCluster, appSourceClusterDefaultSpec)} appFrameworkSpecShc.AppSources = append(appFrameworkSpecShc.AppSources, appSourceSpecCluster...) // Create Single site Cluster and Search Head Cluster, with App Framework enabled on Cluster Master and Deployer @@ -1496,34 +1496,34 @@ var _ = Describe("m4appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on GCP + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCP", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // Redefine app lists as LDAP app isn't in V1 apps appListLocal = appListV1[len(appListV1)/2:] appListCluster = appListV1[:len(appListV1)/2] - // Upload appListLocal list of V2 apps to S3 (to be used for local install) + // Upload appListLocal list of V2 apps to GCP (to be used for local install) appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for local install (local scope)", appVersion)) localappFileList = testenv.GetAppFileList(appListLocal) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for local install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for local install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of V2 apps to S3 (to be used for cluster-wide install) + // Upload appListCluster list of V2 apps to GCP (to be used for cluster-wide install) clusterappFileList = testenv.GetAppFileList(appListCluster) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster install (cluster scope)", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for cluster install (cluster scope)", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // ############ ENABLE MANUAL POLL ############ @@ -1589,32 +1589,32 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCP for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload big-size app to S3 for Indexer Cluster and Search Head Cluster + * Upload big-size app to GCP for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Master and Deployer * Prepare and deploy M4 CRD with app framework * Verify app installation is in progress on Cluster Master and Deployer - * Upload more apps from S3 during bigger app install + * Upload more apps from GCP during bigger app install * Wait for polling interval to pass * Verify all apps are installed on Cluster Master and Deployer */ //################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCP for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) + gcsTestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Prepare Monitoring Console spec with its own app source appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -1635,26 +1635,26 @@ var _ = Describe("m4appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Download all test apps from S3 + // Download all test apps from GCP appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList = testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps") - // Upload big-size app to S3 for Cluster Master + // Upload big-size app to GCP for Cluster Master appList = testenv.BigSingleApp appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Cluster Manager") - s3TestDirIdxc = "m4appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload big-size app to GCP for Cluster Manager") + gcsTestDirIdxc = "m4appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCP test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload big-size app to S3 for Search Head Cluster - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Search Head Cluster") - s3TestDirShc = "m4appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Search Head Cluster") + // Upload big-size app to GCP for Search Head Cluster + testcaseEnvInst.Log.Info("Upload big-size app to GCP for Search Head Cluster") + gcsTestDirShc = "m4appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCP test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 @@ -1662,8 +1662,8 @@ var _ = Describe("m4appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 60) // Deploy M4 CRD testcaseEnvInst.Log.Info("Deploy Multisite Indexer Cluster with Search Head Cluster") @@ -1675,18 +1675,18 @@ var _ = Describe("m4appfw test", func() { // Verify App installation is in progress on Cluster Master testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyComplete) - // Upload more apps to S3 for Cluster Master + // Upload more apps to GCP for Cluster Master appList = testenv.ExtraApps appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload more apps to S3 for Cluster Manager") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload more apps to GCP for Cluster Manager") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCP test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload more apps to S3 for Deployer - testcaseEnvInst.Log.Info("Upload more apps to S3 for Deployer") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Deployer") + // Upload more apps to GCP for Deployer + testcaseEnvInst.Log.Info("Upload more apps to GCP for Deployer") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCP test directory for Deployer") uploadedApps = append(uploadedApps, uploadedFiles...) // Ensure Cluster Master goes to Ready phase @@ -1721,33 +1721,33 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCP for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload big-size app to S3 for Indexer Cluster and Search Head Cluster + * Upload big-size app to GCP for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Master and Deployer * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready ############## VERIFICATIONS ################ * Verify App installation is in progress on Cluster Master and Deployer - * Upload more apps from S3 during bigger app install + * Upload more apps from GCP during bigger app install * Wait for polling interval to pass * Verify all apps are installed on Cluster Master and Deployer */ //################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCP for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) + gcsTestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Prepare Monitoring Console spec with its own app source appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -1768,26 +1768,26 @@ var _ = Describe("m4appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Download all test apps from S3 + // Download all test apps from GCP appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList = testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps") - // Upload big-size app to S3 for Cluster Master + // Upload big-size app to GCP for Cluster Master appList = testenv.BigSingleApp appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Cluster Manager") - s3TestDirIdxc = "m4appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload big-size app to GCP for Cluster Manager") + gcsTestDirIdxc = "m4appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCP test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload big-size app to S3 for Search Head Cluster - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Search Head Cluster") - s3TestDirShc = "m4appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Search Head Cluster") + // Upload big-size app to GCP for Search Head Cluster + testcaseEnvInst.Log.Info("Upload big-size app to GCP for Search Head Cluster") + gcsTestDirShc = "m4appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCP test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 @@ -1795,8 +1795,8 @@ var _ = Describe("m4appfw test", func() { appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy M4 CRD testcaseEnvInst.Log.Info("Deploy Multisite Indexer Cluster with Search Head Cluster") @@ -1809,18 +1809,18 @@ var _ = Describe("m4appfw test", func() { // Verify App installation is in progress testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyComplete) - // Upload more apps to S3 for Cluster Master + // Upload more apps to GCP for Cluster Master appList = testenv.ExtraApps appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload more apps to S3 for Cluster Manager") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload more apps to GCP for Cluster Manager") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCP test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload more apps to S3 for Deployer - testcaseEnvInst.Log.Info("Upload more apps to S3 for Deployer") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Deployer") + // Upload more apps to GCP for Deployer + testcaseEnvInst.Log.Info("Upload more apps to GCP for Deployer") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCP test directory for Deployer") uploadedApps = append(uploadedApps, uploadedFiles...) // Ensure Cluster Master goes to Ready phase @@ -1858,7 +1858,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready * While app install is in progress, restart the operator ########## VERIFICATIONS ########## @@ -1872,30 +1872,30 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Download all apps from S3 + // Download all apps from GCP appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy M4 CRD testcaseEnvInst.Log.Info("Deploy Multisite Indexer Cluster with Search Head Cluster") @@ -1950,7 +1950,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready * While app download is in progress, restart the operator ########## VERIFICATIONS ########## @@ -1964,30 +1964,30 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Download all apps from S3 + // Download all apps from GCP appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy M4 CRD testcaseEnvInst.Log.Info("Deploy Multisite Indexer Cluster with Search Head Cluster") @@ -2042,7 +2042,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready ########## INITIAL VERIFICATIONS ########## * Verify Apps Downloaded in App Deployment Info @@ -2053,7 +2053,7 @@ var _ = Describe("m4appfw test", func() { * Verify bundle push is successful * Verify apps are copied and installed on Monitoring Console and on Search Heads and Indexers pods * Disable the app - * Delete the app from s3 + * Delete the app from gcs * Check for repo state in App Deployment Info */ @@ -2061,23 +2061,23 @@ var _ = Describe("m4appfw test", func() { appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy M4 CRD testcaseEnvInst.Log.Info("Deploy Multisite Indexer Cluster with Search Head Cluster") @@ -2115,13 +2115,13 @@ var _ = Describe("m4appfw test", func() { allAppSourceInfo := []testenv.AppSourceInfo{cmAppSourceInfo, shcAppSourceInfo} testenv.AppFrameWorkVerifications(ctx, deployment, testcaseEnvInst, allAppSourceInfo, splunkPodAge, "") - // Verify repo state on App to be disabled to be 1 (i.e app present on S3 bucket) + // Verify repo state on App to be disabled to be 1 (i.e app present on GCP bucket) appName := appListV1[0] appFileName := testenv.GetAppFileList([]string{appName}) testenv.VerifyAppRepoState(ctx, deployment, testcaseEnvInst, cm.Name, cm.Kind, appSourceNameIdxc, 1, appFileName[0]) // Disable the app - testenv.DisableAppsToS3(downloadDirV1, appFileName, s3TestDirIdxc) + testenv.DisableAppsToGCP(downloadDirV1, appFileName, gcsTestDirIdxc) // Check for changes in App phase to determine if next poll has been triggered testenv.WaitforPhaseChange(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileName) @@ -2138,12 +2138,12 @@ var _ = Describe("m4appfw test", func() { // Wait for App state to update after config file change testenv.WaitforAppInstallState(ctx, deployment, testcaseEnvInst, idxcPodNames, testcaseEnvInst.GetName(), appName, "disabled", true) - // Delete the file from S3 - s3Filepath := filepath.Join(s3TestDirIdxc, appFileName[0]) - err = testenv.DeleteFileOnS3(testS3Bucket, s3Filepath) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to delete %s app on S3 test directory", appFileName)) + // Delete the file from GCP + gcsFilepath := filepath.Join(gcsTestDirIdxc, appFileName[0]) + err = testenv.DeleteFileOnGCP(testGcsBucket, gcsFilepath) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to delete %s app on GCP test directory", appFileName)) - // Verify repo state is set to 2 (i.e app deleted from S3 bucket) + // Verify repo state is set to 2 (i.e app deleted from GCP bucket) testenv.VerifyAppRepoState(ctx, deployment, testcaseEnvInst, cm.Name, cm.Kind, appSourceNameIdxc, 2, appFileName[0]) }) }) @@ -2153,7 +2153,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 + * Upload V1 apps to GCP * Create app source with local scope for M4 SVA, AppsRepoPollInterval=0 to set apps polling as manual * Prepare and deploy M4 CRD with app framework and wait for pods to be ready ########## INITIAL VERIFICATION ############# @@ -2176,25 +2176,25 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 0) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 0) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 0) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 0) // Deploy Multisite Cluster and Search Head Cluster, with App Framework enabled on Cluster Master and Deployer siteCount := 3 @@ -2282,23 +2282,23 @@ var _ = Describe("m4appfw test", func() { Expect(strings.Contains(config.Data["ClusterMaster"], "status: on") && strings.Contains(config.Data["SearchHeadCluster"], "status: on")).To(Equal(true), "Config map update not complete") //############### UPGRADE APPS ################ - // Delete V1 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete V1 apps on GCP + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCP", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCP for Indexer Cluster appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Get Pod age to check for pod resets later @@ -2334,7 +2334,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready * While app download is in progress, restart the operator * While app download is completed, upload new versions of the apps @@ -2357,30 +2357,30 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Download all apps from S3 + // Download all apps from GCP appVersion := "V1" appListV1 := []string{appListV1[0]} appFileList := testenv.GetAppFileList(appListV1) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps") - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, s3TestDirIdxc, 120) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, s3TestDirShc, 120) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeLocal, appSourceNameIdxc, gcsTestDirIdxc, 120) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeLocal, appSourceNameShc, gcsTestDirShc, 120) // Deploy M4 CRD testcaseEnvInst.Log.Info("Deploy Multisite Indexer Cluster with Search Head Cluster") @@ -2393,19 +2393,19 @@ var _ = Describe("m4appfw test", func() { // Verify App Download is in progress on Cluster Master testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyPending) - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCP for Indexer Cluster appVersion = "V2" appListV2 := []string{appListV2[0]} appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Get Pod age to check for pod resets later @@ -2453,7 +2453,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload 15 apps of 100MB size each to S3 for Indexer Cluster and Search Head Cluster for cluster scope + * Upload 15 apps of 100MB size each to GCP for Indexer Cluster and Search Head Cluster for cluster scope * Create app sources for Cluster Master and Deployer with cluster scope * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -2477,21 +2477,21 @@ var _ = Describe("m4appfw test", func() { appVersion := "V1" appList := testenv.PVTestApps appFileList := testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3PVTestApps, downloadDirPVTestApps, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsPVTestApps, downloadDirPVTestApps, appFileList) Expect(err).To(Succeed(), "Unable to download app files") - // Upload apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - s3TestDirIdxc := "m4appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirPVTestApps) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + gcsTestDirIdxc := "m4appfw-idxc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirPVTestApps) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search head Cluster", appVersion)) - s3TestDirShc := "m4appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirPVTestApps) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search head Cluster", appVersion)) + gcsTestDirShc := "m4appfw-shc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirPVTestApps) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Maximum apps to be downloaded in parallel @@ -2502,9 +2502,9 @@ var _ = Describe("m4appfw test", func() { appSourceNameShc := "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceVolumeNameIdxc := "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) appSourceVolumeNameShc := "appframework-test-volume-shc-" + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) appFrameworkSpecIdxc.MaxConcurrentAppDownloads = uint64(maxConcurrentAppDownloads) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) appFrameworkSpecShc.MaxConcurrentAppDownloads = uint64(maxConcurrentAppDownloads) // Deploy Multisite Cluster and Search Head Cluster, with App Framework enabled on Cluster Master and Deployer @@ -2545,7 +2545,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload big-size app to S3 for Indexer Cluster and Search Head Cluster + * Upload big-size app to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready * When app download is complete, delete apps from app directory ########## VERIFICATIONS ########## @@ -2559,30 +2559,30 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Download big size apps from S3 + // Download big size apps from GCP appList := testenv.BigSingleApp appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload big size app to S3 for Indexer Cluster + // Upload big size app to GCP for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info("Upload big size app to S3 for Indexer Cluster") - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big size to S3 test directory for Indexer Cluster") + testcaseEnvInst.Log.Info("Upload big size app to GCP for Indexer Cluster") + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big size to GCP test directory for Indexer Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload big size app to S3 for Search Head Cluster - testcaseEnvInst.Log.Info("Upload big size app to S3 for Search Head Cluster") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big size to S3 test directory for Search Head Cluster") + // Upload big size app to GCP for Search Head Cluster + testcaseEnvInst.Log.Info("Upload big size app to GCP for Search Head Cluster") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big size to GCP test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy M4 CRD testcaseEnvInst.Log.Info("Deploy Multisite Indexer Cluster with Search Head Cluster") @@ -2640,7 +2640,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework * Verify IsDeploymentInProgress is set * Wait for the pods to be ready @@ -2650,23 +2650,23 @@ var _ = Describe("m4appfw test", func() { appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, gcsTestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 appSourceNameIdxc = "appframework-idxc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) appSourceNameShc = "appframework-shc-" + enterpriseApi.ScopeCluster + testenv.RandomDNSName(3) - appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, s3TestDirIdxc, 60) - appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, s3TestDirShc, 60) + appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxc, enterpriseApi.ScopeCluster, appSourceNameIdxc, gcsTestDirIdxc, 60) + appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShc, enterpriseApi.ScopeCluster, appSourceNameShc, gcsTestDirShc, 60) // Deploy M4 CRD testcaseEnvInst.Log.Info("Deploy Multisite Indexer Cluster with Search Head Cluster") diff --git a/test/appframework_gcp/m4/manager_appframework_test.go b/test/appframework_gcp/m4/manager_appframework_test.go index 4db303200..ecd42e383 100644 --- a/test/appframework_gcp/m4/manager_appframework_test.go +++ b/test/appframework_gcp/m4/manager_appframework_test.go @@ -71,9 +71,9 @@ var _ = Describe("m4appfw test", func() { if deployment != nil { deployment.Teardown() } - // Delete files uploaded to S3 + // Delete files uploaded to GCP if !testcaseEnvInst.SkipTeardown { - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) } if testcaseEnvInst != nil { Expect(testcaseEnvInst.Teardown()).ToNot(HaveOccurred()) @@ -92,10 +92,10 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCP for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready ########## INITIAL VERIFICATIONS ########## * Verify Apps Downloaded in App Deployment Info @@ -119,13 +119,13 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCP for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) s3TestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for Monitoring Console @@ -151,16 +151,16 @@ var _ = Describe("m4appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 @@ -231,32 +231,32 @@ var _ = Describe("m4appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############# UPGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on GCP + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCP", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // get revision number of the resource _ = testenv.GetResourceVersion(ctx, deployment, testcaseEnvInst, mc) - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCP for Indexer Cluster appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Upload V2 apps for Monitoring Console - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -310,10 +310,10 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V2 apps to S3 for Monitoring Console + * Upload V2 apps to GCP for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload V2 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V2 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready ########## INITIAL VERIFICATIONS ########## * Verify Apps Downloaded in App Deployment Info @@ -337,13 +337,13 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Upload V2 version of apps to S3 for Monitoring Console + // Upload V2 version of apps to GCP for Monitoring Console appVersion := "V2" appFileList := testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) s3TestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for Monitoring Console @@ -369,16 +369,16 @@ var _ = Describe("m4appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V2 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V2 apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 @@ -434,30 +434,30 @@ var _ = Describe("m4appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############# DOWNGRADE APPS ################ - // Delete V2 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) + // Delete V2 apps on GCP + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCP", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion = "V1" appFileList = testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Monitoring Console - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCP for Monitoring Console + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -508,7 +508,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for M4 + * Upload V1 apps to GCP for M4 * Create app source for M4 SVA (Cluster Manager and Deployer) * Prepare and deploy M4 CRD with app config and wait for pods to be ready ########### INITIAL VERIFICATIONS ######### @@ -544,18 +544,18 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 @@ -787,7 +787,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 + * Upload V1 apps to GCP * Create app source with local scope for M4 SVA (Cluster Manager and Deployer) * Prepare and deploy M4 CRD with app framework and wait for pods to be ready ########## INITIAL VERIFICATION ############# @@ -810,18 +810,18 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -866,23 +866,23 @@ var _ = Describe("m4appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete V1 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete V1 apps on GCP + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCP", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCP for Indexer Cluster appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -919,10 +919,10 @@ var _ = Describe("m4appfw test", func() { It("integration, m4, managerappframeworkm4, appframework: can deploy a M4 SVA with App Framework enabled for manual poll", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCP for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console with app framework and wait for the pod to be ready - * Upload V1 apps to S3 + * Upload V1 apps to GCP * Create app source with manaul poll for M4 SVA (Cluster Manager and Deployer) * Prepare and deploy M4 CRD with app framework and wait for pods to be ready ########## INITIAL VERIFICATION ############# @@ -950,13 +950,13 @@ var _ = Describe("m4appfw test", func() { */ // ################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCP for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) s3TestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for Monitoring Console @@ -982,16 +982,16 @@ var _ = Describe("m4appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1046,24 +1046,24 @@ var _ = Describe("m4appfw test", func() { // ############### UPGRADE APPS ################ - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCP for Indexer Cluster appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Monitoring Console - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + // Upload V2 apps to GCP for Monitoring Console + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1174,7 +1174,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 + * Upload V1 apps to GCP * Create app source with local scope for M4 SVA (Cluster Manager and Deployer) * Prepare and deploy M4 CRD with app framework and wait for pods to be ready ########## INITIAL VERIFICATION ############# @@ -1201,18 +1201,18 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1256,23 +1256,23 @@ var _ = Describe("m4appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete V1 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete V1 apps on GCP + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCP", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCP for Indexer Cluster appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1358,7 +1358,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### * Split Applist into clusterlist and local list - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster for local and cluster scope + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster for local and cluster scope * Create app sources for Cluster Manager and Deployer with local and cluster scope * Prepare and deploy m4 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -1370,7 +1370,7 @@ var _ = Describe("m4appfw test", func() { * Verify bundle push is successful * Verify V1 apps are copied, installed on Monitoring Console and on Search Heads and Indexers pods ############### UPGRADE APPS ################ - * Upload V2 apps on S3 + * Upload V2 apps on GCP * Wait for all m4 pods to be ready ############ FINAL VERIFICATIONS ############ * Verify Apps are Downloaded in App Deployment Info @@ -1388,34 +1388,34 @@ var _ = Describe("m4appfw test", func() { appListLocal := appListV1[len(appListV1)/2:] appListCluster := appListV1[:len(appListV1)/2] - // Upload appListLocal list of apps to S3 (to be used for local install) for Idxc - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + // Upload appListLocal list of apps to GCP (to be used for local install) for Idxc + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for local install (local scope)", appVersion)) s3TestDirIdxcLocal = "m4appfw-" + testenv.RandomDNSName(4) localappFileList := testenv.GetAppFileList(appListLocal) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to S3 test directory", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to GCP test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListLocal list of apps to S3 (to be used for local install) for Shc - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + // Upload appListLocal list of apps to GCP (to be used for local install) for Shc + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for local install (local scope)", appVersion)) s3TestDirShcLocal = "m4appfw-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to S3 test directory", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShcLocal, localappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (local scope) to GCP test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) + // Upload appListCluster list of apps to GCP (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for cluster-wide install (cluster scope)", appVersion)) s3TestDirIdxcCluster = "m4appfw-cluster-" + testenv.RandomDNSName(4) clusterappFileList := testenv.GetAppFileList(appListCluster) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to GCP test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of apps to S3 (to be used for cluster-wide install) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster-wide install (cluster scope)", appVersion)) + // Upload appListCluster list of apps to GCP (to be used for cluster-wide install) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for cluster-wide install (cluster scope)", appVersion)) s3TestDirShcCluster = "m4appfw-cluster-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to S3 test directory", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShcCluster, clusterappFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps (cluster scope) to GCP test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -1431,7 +1431,7 @@ var _ = Describe("m4appfw test", func() { // Create App framework Spec for Cluster manager with scope local and append cluster scope appFrameworkSpecIdxc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameIdxcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalIdxc, s3TestDirIdxcLocal, 0) - volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + volumeSpecCluster := []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameIdxcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultGCPRegion())} appFrameworkSpecIdxc.VolList = append(appFrameworkSpecIdxc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec := enterpriseApi.AppSourceDefaultSpec{ VolName: appSourceVolumeNameIdxcCluster, @@ -1442,7 +1442,7 @@ var _ = Describe("m4appfw test", func() { // Create App framework Spec for Search head cluster with scope local and append cluster scope appFrameworkSpecShc := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameShcLocal, enterpriseApi.ScopeLocal, appSourceNameLocalShc, s3TestDirShcLocal, 0) - volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetS3Endpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultS3Region())} + volumeSpecCluster = []enterpriseApi.VolumeSpec{testenv.GenerateIndexVolumeSpec(appSourceVolumeNameShcCluster, testenv.GetGCPEndpoint(), testcaseEnvInst.GetIndexSecretName(), "aws", "s3", testenv.GetDefaultGCPRegion())} appFrameworkSpecShc.VolList = append(appFrameworkSpecShc.VolList, volumeSpecCluster...) appSourceClusterDefaultSpec = enterpriseApi.AppSourceDefaultSpec{ @@ -1495,34 +1495,34 @@ var _ = Describe("m4appfw test", func() { testenv.VerifyNoPodReset(ctx, deployment, testcaseEnvInst, testcaseEnvInst.GetName(), splunkPodAge, nil) //############### UPGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on GCP + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCP", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil // Redefine app lists as LDAP app isn't in V1 apps appListLocal = appListV1[len(appListV1)/2:] appListCluster = appListV1[:len(appListV1)/2] - // Upload appListLocal list of V2 apps to S3 (to be used for local install) + // Upload appListLocal list of V2 apps to GCP (to be used for local install) appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for local install (local scope)", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for local install (local scope)", appVersion)) localappFileList = testenv.GetAppFileList(appListLocal) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for local install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcLocal, localappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for local install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShcLocal, localappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for local install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload appListCluster list of V2 apps to S3 (to be used for cluster-wide install) + // Upload appListCluster list of V2 apps to GCP (to be used for cluster-wide install) clusterappFileList = testenv.GetAppFileList(appListCluster) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for cluster install (cluster scope)", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for cluster install (cluster scope)", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShcCluster, clusterappFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for cluster-wide install", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShcCluster, clusterappFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for cluster-wide install", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // ############ ENABLE MANUAL POLL ############ @@ -1588,26 +1588,26 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCP for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload big-size app to S3 for Indexer Cluster and Search Head Cluster + * Upload big-size app to GCP for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Manager and Deployer * Prepare and deploy M4 CRD with app framework * Verify app installation is in progress on Cluster Manager and Deployer - * Upload more apps from S3 during bigger app install + * Upload more apps from GCP during bigger app install * Wait for polling interval to pass * Verify all apps are installed on Cluster Manager and Deployer */ //################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCP for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) s3TestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Prepare Monitoring Console spec with its own app source @@ -1634,26 +1634,26 @@ var _ = Describe("m4appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Download all test apps from S3 + // Download all test apps from GCP appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList = testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps") - // Upload big-size app to S3 for Cluster Manager + // Upload big-size app to GCP for Cluster Manager appList = testenv.BigSingleApp appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Cluster Manager") + testcaseEnvInst.Log.Info("Upload big-size app to GCP for Cluster Manager") s3TestDirIdxc = "m4appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Cluster Manager") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCP test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload big-size app to S3 for Search Head Cluster - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Search Head Cluster") + // Upload big-size app to GCP for Search Head Cluster + testcaseEnvInst.Log.Info("Upload big-size app to GCP for Search Head Cluster") s3TestDirShc = "m4appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Search Head Cluster") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCP test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 @@ -1674,18 +1674,18 @@ var _ = Describe("m4appfw test", func() { // Verify App installation is in progress on Cluster Manager testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyComplete) - // Upload more apps to S3 for Cluster Manager + // Upload more apps to GCP for Cluster Manager appList = testenv.ExtraApps appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload more apps to S3 for Cluster Manager") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload more apps to GCP for Cluster Manager") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCP test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload more apps to S3 for Deployer - testcaseEnvInst.Log.Info("Upload more apps to S3 for Deployer") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Deployer") + // Upload more apps to GCP for Deployer + testcaseEnvInst.Log.Info("Upload more apps to GCP for Deployer") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCP test directory for Deployer") uploadedApps = append(uploadedApps, uploadedFiles...) // Ensure Cluster Manager goes to Ready phase @@ -1720,27 +1720,27 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCP for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready - * Upload big-size app to S3 for Indexer Cluster and Search Head Cluster + * Upload big-size app to GCP for Indexer Cluster and Search Head Cluster * Create app sources for Cluster Manager and Deployer * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready ############## VERIFICATIONS ################ * Verify App installation is in progress on Cluster Manager and Deployer - * Upload more apps from S3 during bigger app install + * Upload more apps from GCP during bigger app install * Wait for polling interval to pass * Verify all apps are installed on Cluster Manager and Deployer */ //################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCP for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Monitoring Console", appVersion)) s3TestDirMC := "m4appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Monitoring Console %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Prepare Monitoring Console spec with its own app source @@ -1767,26 +1767,26 @@ var _ = Describe("m4appfw test", func() { // Verify Monitoring Console is ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Download all test apps from S3 + // Download all test apps from GCP appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList = testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps") - // Upload big-size app to S3 for Cluster Manager + // Upload big-size app to GCP for Cluster Manager appList = testenv.BigSingleApp appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Cluster Manager") + testcaseEnvInst.Log.Info("Upload big-size app to GCP for Cluster Manager") s3TestDirIdxc = "m4appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Cluster Manager") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCP test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload big-size app to S3 for Search Head Cluster - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Search Head Cluster") + // Upload big-size app to GCP for Search Head Cluster + testcaseEnvInst.Log.Info("Upload big-size app to GCP for Search Head Cluster") s3TestDirShc = "m4appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Search Head Cluster") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCP test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 @@ -1808,18 +1808,18 @@ var _ = Describe("m4appfw test", func() { // Verify App installation is in progress testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyComplete) - // Upload more apps to S3 for Cluster Manager + // Upload more apps to GCP for Cluster Manager appList = testenv.ExtraApps appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload more apps to S3 for Cluster Manager") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Cluster Manager") + testcaseEnvInst.Log.Info("Upload more apps to GCP for Cluster Manager") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCP test directory for Cluster Manager") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload more apps to S3 for Deployer - testcaseEnvInst.Log.Info("Upload more apps to S3 for Deployer") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Deployer") + // Upload more apps to GCP for Deployer + testcaseEnvInst.Log.Info("Upload more apps to GCP for Deployer") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCP test directory for Deployer") uploadedApps = append(uploadedApps, uploadedFiles...) // Ensure Cluster Manager goes to Ready phase @@ -1857,7 +1857,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready * While app install is in progress, restart the operator ########## VERIFICATIONS ########## @@ -1871,23 +1871,23 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Download all apps from S3 + // Download all apps from GCP appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 @@ -1949,7 +1949,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready * While app download is in progress, restart the operator ########## VERIFICATIONS ########## @@ -1963,23 +1963,23 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Download all apps from S3 + // Download all apps from GCP appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 @@ -2041,7 +2041,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready ########## INITIAL VERIFICATIONS ########## * Verify Apps Downloaded in App Deployment Info @@ -2060,16 +2060,16 @@ var _ = Describe("m4appfw test", func() { appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 @@ -2114,13 +2114,13 @@ var _ = Describe("m4appfw test", func() { allAppSourceInfo := []testenv.AppSourceInfo{cmAppSourceInfo, shcAppSourceInfo} testenv.AppFrameWorkVerifications(ctx, deployment, testcaseEnvInst, allAppSourceInfo, splunkPodAge, "") - // Verify repo state on App to be disabled to be 1 (i.e app present on S3 bucket) + // Verify repo state on App to be disabled to be 1 (i.e app present on GCP bucket) appName := appListV1[0] appFileName := testenv.GetAppFileList([]string{appName}) testenv.VerifyAppRepoState(ctx, deployment, testcaseEnvInst, cm.Name, cm.Kind, appSourceNameIdxc, 1, appFileName[0]) // Disable the app - testenv.DisableAppsToS3(downloadDirV1, appFileName, s3TestDirIdxc) + testenv.DisableAppsToGCP(downloadDirV1, appFileName, s3TestDirIdxc) // Check for changes in App phase to determine if next poll has been triggered testenv.WaitforPhaseChange(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileName) @@ -2137,12 +2137,12 @@ var _ = Describe("m4appfw test", func() { // Wait for App state to update after config file change testenv.WaitforAppInstallState(ctx, deployment, testcaseEnvInst, idxcPodNames, testcaseEnvInst.GetName(), appName, "disabled", true) - // Delete the file from S3 + // Delete the file from GCP s3Filepath := filepath.Join(s3TestDirIdxc, appFileName[0]) - err = testenv.DeleteFileOnS3(testS3Bucket, s3Filepath) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to delete %s app on S3 test directory", appFileName)) + err = testenv.DeleteFileOnGCP(testGcsBucket, s3Filepath) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to delete %s app on GCP test directory", appFileName)) - // Verify repo state is set to 2 (i.e app deleted from S3 bucket) + // Verify repo state is set to 2 (i.e app deleted from GCP bucket) testenv.VerifyAppRepoState(ctx, deployment, testcaseEnvInst, cm.Name, cm.Kind, appSourceNameIdxc, 2, appFileName[0]) }) }) @@ -2152,7 +2152,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 + * Upload V1 apps to GCP * Create app source with local scope for M4 SVA, AppsRepoPollInterval=0 to set apps polling as manual * Prepare and deploy M4 CRD with app framework and wait for pods to be ready ########## INITIAL VERIFICATION ############# @@ -2175,18 +2175,18 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Indexer Cluster + // Upload V1 apps to GCP for Indexer Cluster appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec @@ -2281,23 +2281,23 @@ var _ = Describe("m4appfw test", func() { Expect(strings.Contains(config.Data["ClusterManager"], "status: on") && strings.Contains(config.Data["SearchHeadCluster"], "status: on")).To(Equal(true), "Config map update not complete") //############### UPGRADE APPS ################ - // Delete V1 apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete V1 apps on GCP + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCP", appVersion)) + testenv.DeleteFilesOnGCP(testGcsBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCP for Indexer Cluster appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Get Pod age to check for pod resets later @@ -2333,7 +2333,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready * While app download is in progress, restart the operator * While app download is completed, upload new versions of the apps @@ -2356,23 +2356,23 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Download all apps from S3 + // Download all apps from GCP appVersion := "V1" appListV1 := []string{appListV1[0]} appFileList := testenv.GetAppFileList(appListV1) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps") - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 @@ -2392,19 +2392,19 @@ var _ = Describe("m4appfw test", func() { // Verify App Download is in progress on Cluster Manager testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), cm.Kind, appSourceNameIdxc, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyPending) - // Upload V2 apps to S3 for Indexer Cluster + // Upload V2 apps to GCP for Indexer Cluster appVersion = "V2" appListV2 := []string{appListV2[0]} appFileList = testenv.GetAppFileList(appListV2) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V2 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V2 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Get Pod age to check for pod resets later @@ -2452,7 +2452,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload 15 apps of 100MB size each to S3 for Indexer Cluster and Search Head Cluster for cluster scope + * Upload 15 apps of 100MB size each to GCP for Indexer Cluster and Search Head Cluster for cluster scope * Create app sources for Cluster Master and Deployer with cluster scope * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready ######### INITIAL VERIFICATIONS ############# @@ -2476,21 +2476,21 @@ var _ = Describe("m4appfw test", func() { appVersion := "V1" appList := testenv.PVTestApps appFileList := testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3PVTestApps, downloadDirPVTestApps, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsPVTestApps, downloadDirPVTestApps, appFileList) Expect(err).To(Succeed(), "Unable to download app files") - // Upload apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) + // Upload apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) s3TestDirIdxc := "m4appfw-idxc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirPVTestApps) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirPVTestApps) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search head Cluster", appVersion)) + // Upload apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search head Cluster", appVersion)) s3TestDirShc := "m4appfw-shc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirPVTestApps) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirPVTestApps) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Maximum apps to be downloaded in parallel @@ -2544,7 +2544,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload big-size app to S3 for Indexer Cluster and Search Head Cluster + * Upload big-size app to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework and wait for the pods to be ready * When app download is complete, delete apps from app directory ########## VERIFICATIONS ########## @@ -2558,23 +2558,23 @@ var _ = Describe("m4appfw test", func() { */ //################## SETUP ################## - // Download big size apps from S3 + // Download big size apps from GCP appList := testenv.BigSingleApp appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big-size app") - // Upload big size app to S3 for Indexer Cluster + // Upload big size app to GCP for Indexer Cluster appVersion := "V1" - testcaseEnvInst.Log.Info("Upload big size app to S3 for Indexer Cluster") - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big size to S3 test directory for Indexer Cluster") + testcaseEnvInst.Log.Info("Upload big size app to GCP for Indexer Cluster") + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big size to GCP test directory for Indexer Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload big size app to S3 for Search Head Cluster - testcaseEnvInst.Log.Info("Upload big size app to S3 for Search Head Cluster") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big size to S3 test directory for Search Head Cluster") + // Upload big size app to GCP for Search Head Cluster + testcaseEnvInst.Log.Info("Upload big size app to GCP for Search Head Cluster") + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big size to GCP test directory for Search Head Cluster") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 @@ -2639,7 +2639,7 @@ var _ = Describe("m4appfw test", func() { /* Test Steps ################## SETUP ################## - * Upload V1 apps to S3 for Indexer Cluster and Search Head Cluster + * Upload V1 apps to GCP for Indexer Cluster and Search Head Cluster * Prepare and deploy M4 CRD with app framework * Verify IsDeploymentInProgress is set * Wait for the pods to be ready @@ -2649,16 +2649,16 @@ var _ = Describe("m4appfw test", func() { appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - // Upload V1 apps to S3 for Indexer Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Indexer Cluster", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirIdxc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Indexer Cluster %s", appVersion, testS3Bucket)) + // Upload V1 apps to GCP for Indexer Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Indexer Cluster", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGcsBucket, s3TestDirIdxc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Indexer Cluster %s", appVersion, testGcsBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload V1 apps to S3 for Search Head Cluster - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Search Head Cluster", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirShc, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Search Head Cluster", appVersion)) + // Upload V1 apps to GCP for Search Head Cluster + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCP for Search Head Cluster", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGcsBucket, s3TestDirShc, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCP test directory for Search Head Cluster", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for M4 diff --git a/test/appframework_gcp/s1/appframework_gcs_suite_test.go b/test/appframework_gcp/s1/appframework_gcs_suite_test.go index 95702e0df..8b5919a9f 100644 --- a/test/appframework_gcp/s1/appframework_gcs_suite_test.go +++ b/test/appframework_gcp/s1/appframework_gcs_suite_test.go @@ -39,11 +39,11 @@ var ( testSuiteName = "s1appfw-" + testenv.RandomDNSName(3) appListV1 []string appListV2 []string - testDataS3Bucket = os.Getenv("TEST_BUCKET") - testS3Bucket = os.Getenv("TEST_INDEXES_S3_BUCKET") - s3AppDirV1 = testenv.AppLocationV1 - s3AppDirV2 = testenv.AppLocationV2 - s3PVTestApps = testenv.PVTestAppsLocation + testDataGcsBucket = os.Getenv("TEST_BUCKET") + testGCSBucket = os.Getenv("TEST_INDEXES_S3_BUCKET") + gcsAppDirV1 = testenv.AppLocationV1 + gcsAppDirV2 = testenv.AppLocationV2 + gcsPVTestApps = testenv.PVTestAppsLocation currDir, _ = os.Getwd() downloadDirV1 = filepath.Join(currDir, "s1appfwV1-"+testenv.RandomDNSName(4)) downloadDirV2 = filepath.Join(currDir, "s1appfwV2-"+testenv.RandomDNSName(4)) @@ -64,20 +64,20 @@ var _ = BeforeSuite(func() { Expect(err).ToNot(HaveOccurred()) if testenv.ClusterProvider == "gcp" { - // Create a list of apps to upload to S3 + // Create a list of apps to upload to GCP appListV1 = testenv.BasicApps appFileList := testenv.GetAppFileList(appListV1) - // Download V1 Apps from S3 - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + // Download V1 Apps from GCP + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download V1 app files") - // Create a list of apps to upload to S3 after poll period + // Create a list of apps to upload to GCP after poll period appListV2 = append(appListV1, testenv.NewAppsAddedBetweenPolls...) appFileList = testenv.GetAppFileList(appListV2) - // Download V2 Apps from S3 - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV2, downloadDirV2, appFileList) + // Download V2 Apps from GCP + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV2, downloadDirV2, appFileList) Expect(err).To(Succeed(), "Unable to download V2 app files") } else { testenvInstance.Log.Info("Skipping Before Suite Setup", "Cluster Provider", testenv.ClusterProvider) diff --git a/test/appframework_gcp/s1/appframework_gcs_test.go b/test/appframework_gcp/s1/appframework_gcs_test.go index 3526a866f..2d777f022 100644 --- a/test/appframework_gcp/s1/appframework_gcs_test.go +++ b/test/appframework_gcp/s1/appframework_gcs_test.go @@ -35,7 +35,7 @@ var _ = Describe("s1appfw test", func() { var testcaseEnvInst *testenv.TestCaseEnv var deployment *testenv.Deployment - var s3TestDir string + var gcsTestDir string var uploadedApps []string var appSourceName string var appSourceVolumeName string @@ -50,7 +50,7 @@ var _ = Describe("s1appfw test", func() { Expect(err).To(Succeed(), "Unable to create testcaseenv") deployment, err = testcaseEnvInst.NewDeployment(testenv.RandomDNSName(3)) Expect(err).To(Succeed(), "Unable to create deployment") - s3TestDir = "s1appfw-" + testenv.RandomDNSName(4) + gcsTestDir = "s1appfw-" + testenv.RandomDNSName(4) appSourceVolumeName = "appframework-test-volume-" + testenv.RandomDNSName(3) }) @@ -62,9 +62,9 @@ var _ = Describe("s1appfw test", func() { if deployment != nil { deployment.Teardown() } - // Delete files uploaded to S3 + // Delete files uploaded to GCS if !testcaseEnvInst.SkipTeardown { - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + testenv.DeleteFilesOnGCP(testGCSBucket, uploadedApps) } if testcaseEnvInst != nil { Expect(testcaseEnvInst.Teardown()).ToNot(HaveOccurred()) @@ -83,10 +83,10 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to gcs for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console with app framework and wait for the pod to be ready - * Upload V1 apps to S3 for Standalone + * Upload V1 apps to gcs for Standalone * Create app source for Standalone * Prepare and deploy Standalone with app framework and wait for the pod to be ready ############ V1 APP VERIFICATION FOR STANDALONE AND MONITORING CONSOLE ########### @@ -99,7 +99,7 @@ var _ = Describe("s1appfw test", func() { * Verify no pod resets triggered due to app install * Verify App enabled and version by running splunk cmd ############ UPGRADE V2 APPS ########### - * Upload V2 apps to S3 App Source + * Upload V2 apps to gcs App Source ############ V2 APP VERIFICATION FOR STANDALONE AND MONITORING CONSOLE ########### * Verify Apps Downloaded in App Deployment Info * Verify Apps Copied in App Deployment Info @@ -113,20 +113,20 @@ var _ = Describe("s1appfw test", func() { // ################## SETUP FOR MONITORING CONSOLE #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to gcs for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to gcs for Monitoring Console", appVersion)) - s3TestDirMC := "s1appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + gcsTestDirMC := "s1appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to gcs test directory for Monitoring Console %s", appVersion, testGCSBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework spec for Monitoring Console appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -147,10 +147,10 @@ var _ = Describe("s1appfw test", func() { testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) // ################## SETUP FOR STANDALONE #################### - // Upload V1 apps to S3 for Standalone - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Standalone", appVersion)) + // Upload V1 apps to gcs for Standalone + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to gcs for Standalone", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to gcs test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Maximum apps to be downloaded in parallel @@ -158,7 +158,7 @@ var _ = Describe("s1appfw test", func() { // Create App framework spec for Standalone appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) appFrameworkSpec.MaxConcurrentAppDownloads = uint64(maxConcurrentAppDownloads) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -206,22 +206,22 @@ var _ = Describe("s1appfw test", func() { // ############## UPGRADE APPS ################# - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on gcs + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on gcs", appVersion)) + testenv.DeleteFilesOnGCP(testGCSBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 for Standalone and Monitoring Console + // Upload V2 apps to gcs for Standalone and Monitoring Console appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone and Monitoring Console", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to gcs for Standalone and Monitoring Console", appVersion)) appFileList = testenv.GetAppFileList(appListV2) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Standalone", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to gcs test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to gcs test directory for Monitoring Console %s", appVersion, testGCSBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -254,10 +254,10 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V2 apps to S3 for Monitoring Console + * Upload V2 apps to gcs for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console with app framework and wait for the pod to be ready - * Upload V2 apps to S3 for Standalone + * Upload V2 apps to gcs for Standalone * Create app source for Standalone * Prepare and deploy Standalone with app framework and wait for the pod to be ready ############ INITIAL VERIFICATION FOR STANDALONE AND MONITORING CONSOLE ########### @@ -270,7 +270,7 @@ var _ = Describe("s1appfw test", func() { * Verify no pod resets triggered due to app install * Verify App enabled and version by running splunk cmd ############# DOWNGRADE APPS ################ - * Upload V1 apps on S3 + * Upload V1 apps on gcs * Wait for Monitoring Console and Standalone pods to be ready ########## DOWNGRADE VERIFICATION FOR STANDALONE AND MONITORING CONSOLE ########### * Verify Apps Downloaded in App Deployment Info @@ -284,27 +284,27 @@ var _ = Describe("s1appfw test", func() { */ //################## SETUP #################### - // Upload V2 apps to S3 + // Upload V2 apps to gcs appVersion := "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone and Monitoring Console", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to gcs for Standalone and Monitoring Console", appVersion)) appFileList := testenv.GetAppFileList(appListV2) - s3TestDir = "s1appfw-" + testenv.RandomDNSName(4) + gcsTestDir = "s1appfw-" + testenv.RandomDNSName(4) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Standalone", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to gcs for Standalone", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to gcs test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "s1appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to gcs for Monitoring Console", appVersion)) + gcsTestDirMC := "s1appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to gcs test directory for Monitoring Console %s", appVersion, testGCSBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for Monitoring Console appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -326,7 +326,7 @@ var _ = Describe("s1appfw test", func() { // Create App framework Spec for Standalone appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -363,25 +363,25 @@ var _ = Describe("s1appfw test", func() { testenv.AppFrameWorkVerifications(ctx, deployment, testcaseEnvInst, allAppSourceInfo, splunkPodAge, "") // ############# DOWNGRADE APPS ################ - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on gcs + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on gcs", appVersion)) + testenv.DeleteFilesOnGCP(testGCSBucket, uploadedApps) uploadedApps = nil // get revision number of the resource resourceVersion := testenv.GetResourceVersion(ctx, deployment, testcaseEnvInst, mc) - // Upload V1 apps to S3 for Standalone and Monitoring Console + // Upload V1 apps to gcs for Standalone and Monitoring Console appVersion = "V1" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone and Monitoring Console", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to gcs for Standalone and Monitoring Console", appVersion)) appFileList = testenv.GetAppFileList(appListV1) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Standalone", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to gcs test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to gcs test directory for Monitoring Console %s", appVersion, testGCSBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -417,7 +417,7 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload apps on S3 + * Upload apps on gcs * Create 2 app sources for Monitoring Console and Standalone * Prepare and deploy Monitoring Console CRD with app framework and wait for the pod to be ready * Prepare and deploy Standalone CRD with app framework and wait for the pod to be ready @@ -457,23 +457,23 @@ var _ = Describe("s1appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Standalone and Monitoring Console + // Upload V1 apps to gcs for Standalone and Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone and Monitoring Console", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to gcs for Standalone and Monitoring Console", appVersion)) - s3TestDirMC := "s1appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + gcsTestDirMC := "s1appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to gcs test directory for Monitoring Console %s", appVersion, testGCSBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Standalone", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to gcs test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for Monitoring Console appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -493,15 +493,15 @@ var _ = Describe("s1appfw test", func() { // Verify Monitoring Console is Ready and stays in ready state // testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload apps to S3 for Standalone - s3TestDir := "s1appfw-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload apps to S3 test directory") + // Upload apps to gcs for Standalone + gcsTestDir := "s1appfw-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload apps to gcs test directory") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for Standalone appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -612,7 +612,7 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload apps on S3 + * Upload apps on gcs * Create app source for Standalone * Prepare and deploy Standalone CRD with app framework and wait for the pod to be ready ########## INITIAL VERIFICATION ############# @@ -628,7 +628,7 @@ var _ = Describe("s1appfw test", func() { * Scale up Standalone * Wait for Standalone to be ready ############### UPGRADE APPS ################ - * Upload V2 apps to S3 App Source + * Upload V2 apps to gcs App Source ###### SCALING UP/UPGRADE VERIFICATIONS ##### * Verify Apps Downloaded in App Deployment Info * Verify Apps Copied in App Deployment Info @@ -641,24 +641,24 @@ var _ = Describe("s1appfw test", func() { */ //################## SETUP #################### - // Upload V1 apps to S3 for Standalone + // Upload V1 apps to gcs for Standalone appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to gcs for Standalone", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Standalone", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to gcs test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload apps to S3 for Standalone - s3TestDir := "s1appfw-" + testenv.RandomDNSName(4) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload apps to S3 test directory") + // Upload apps to gcs for Standalone + gcsTestDir := "s1appfw-" + testenv.RandomDNSName(4) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload apps to gcs test directory") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec for Standalone appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -707,18 +707,18 @@ var _ = Describe("s1appfw test", func() { testenv.StandaloneReady(ctx, deployment, deployment.GetName(), standalone, testcaseEnvInst) // ############## UPGRADE APPS ################# - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on gcs + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on gcs", appVersion)) + testenv.DeleteFilesOnGCP(testGCSBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 for Standalone and Monitoring Console + // Upload V2 apps to gcs for Standalone and Monitoring Console appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone and Monitoring Console", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to gcs for Standalone and Monitoring Console", appVersion)) appFileList = testenv.GetAppFileList(appListV2) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Standalone", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to gcs test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -746,7 +746,7 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload ES app to S3 + * Upload ES app to gcs * Create App Source for Standalone * Prepare and deploy Standalone and wait for the pod to be ready ################## VERIFICATION ############# @@ -755,22 +755,22 @@ var _ = Describe("s1appfw test", func() { //################## SETUP #################### - // Download ES App from S3 - testcaseEnvInst.Log.Info("Download ES app from S3") + // Download ES App from gcs + testcaseEnvInst.Log.Info("Download ES app from gcs") esApp := []string{"SplunkEnterpriseSecuritySuite"} appFileList := testenv.GetAppFileList(esApp) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download ES app") - // Upload ES app to S3 - testcaseEnvInst.Log.Info("Upload ES app on S3") - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload ES app to S3 test directory") + // Upload ES app to gcs + testcaseEnvInst.Log.Info("Upload ES app on gcs") + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload ES app to gcs test directory") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopePremiumApps, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopePremiumApps, appSourceName, gcsTestDir, 60) appFrameworkSpec.AppSources[0].PremiumAppsProps = enterpriseApi.PremiumAppsProps{ Type: enterpriseApi.PremiumAppsTypeEs, EsDefaults: enterpriseApi.EsDefaults{ @@ -807,21 +807,21 @@ var _ = Describe("s1appfw test", func() { // ############## UPGRADE APPS ################# - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on gcs + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on gcs", appVersion)) + testenv.DeleteFilesOnGCP(testGCSBucket, uploadedApps) uploadedApps = nil - // Download ES App from S3 - testcaseEnvInst.Log.Info("Download updated ES app from S3") - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV2, downloadDirV2, appFileList) + // Download ES App from gcs + testcaseEnvInst.Log.Info("Download updated ES app from gcs") + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV2, downloadDirV2, appFileList) Expect(err).To(Succeed(), "Unable to download ES app") - // Upload V2 apps to S3 for Standalone + // Upload V2 apps to gcs for Standalone appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s Es app to S3 for Standalone and Monitoring Console", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s Es app to S3 test directory for Standalone", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s Es app to gcs for Standalone and Monitoring Console", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s Es app to gcs test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -848,7 +848,7 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### * Create app source for Standalone - * Add more apps than usual on S3 for this test + * Add more apps than usual on gcs for this test * Prepare and deploy Standalone with app framework and wait for the pod to be ready ############### VERIFICATION ################ * Verify Apps Downloaded in App Deployment Info @@ -867,21 +867,21 @@ var _ = Describe("s1appfw test", func() { appFileList := testenv.GetAppFileList(appList) appVersion := "V1" - // Download apps from S3 - testcaseEnvInst.Log.Info("Download bigger amount of apps from S3 for this test") - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + // Download apps from gcs + testcaseEnvInst.Log.Info("Download bigger amount of apps from gcs for this test") + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps files") - // Upload apps to S3 - testcaseEnvInst.Log.Info("Upload bigger amount of apps to S3 for this test") - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload apps to S3 test directory") + // Upload apps to GCS + testcaseEnvInst.Log.Info("Upload bigger amount of apps to GCS for this test") + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload apps to GCS test directory") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -916,7 +916,7 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCS for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console with app framework and wait for the pod to be ready * Create app source for Standalone @@ -931,7 +931,7 @@ var _ = Describe("s1appfw test", func() { * Verify no pod resets triggered due to app install * Verify App enabled and version by running splunk cmd ############ UPGRADE V2 APPS ########### - * Upload V2 apps to S3 App Source + * Upload V2 apps to GCS App Source ############ VERIFICATION APPS ARE NOT UPDATED BEFORE ENABLING MANUAL POLL ############ * Verify Apps are not updated ############ ENABLE MANUAL POLL ############ @@ -949,19 +949,19 @@ var _ = Describe("s1appfw test", func() { //################## SETUP #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCS for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "s1appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Monitoring Console", appVersion)) + gcsTestDirMC := "s1appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Monitoring Console %s", appVersion, testGCSBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework spec for Monitoring Console appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 0) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 0) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -981,14 +981,14 @@ var _ = Describe("s1appfw test", func() { // Verify Monitoring Console is Ready and stays in ready state testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) - // Upload V1 apps to S3 - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory", appVersion)) + // Upload V1 apps to GCS + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 0) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 0) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -1024,20 +1024,20 @@ var _ = Describe("s1appfw test", func() { //############### UPGRADE APPS ################ - //Delete apps on S3 for new Apps - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + //Delete apps on GCS for new Apps + testenv.DeleteFilesOnGCP(testGCSBucket, uploadedApps) uploadedApps = nil - //Upload new Versioned Apps to S3 + //Upload new Versioned Apps to GCS appVersion = "V2" appFileList = testenv.GetAppFileList(appListV2) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDirMC, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Monitoring Console %s", appVersion, testGCSBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1094,7 +1094,7 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Add more apps than usual on S3 for this test + * Add more apps than usual on GCS for this test * Split the App list into 2 segments with a common apps and uncommon apps for each Standalone * Create app source for 2 Standalones * Prepare and deploy Standalones with app framework and wait for the pod to be ready @@ -1115,30 +1115,30 @@ var _ = Describe("s1appfw test", func() { appList2 := append(appListV1, testenv.RestartNeededApps[:len(testenv.RestartNeededApps)/2]...) appVersion := "V1" - // Download apps from S3 - testcaseEnvInst.Log.Info("Download the extra apps from S3 for this test") + // Download apps from GCS + testcaseEnvInst.Log.Info("Download the extra apps from GCS for this test") appFileList := testenv.GetAppFileList(testenv.RestartNeededApps) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps files") - // Upload apps to S3 for first Standalone - testcaseEnvInst.Log.Info("Upload apps to S3 for 1st Standalone") + // Upload apps to GCS for first Standalone + testcaseEnvInst.Log.Info("Upload apps to GCS for 1st Standalone") appFileListStandalone1 := testenv.GetAppFileList(appList1) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileListStandalone1, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload apps to S3 test directory") + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileListStandalone1, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload apps to GCS test directory") uploadedApps = append(uploadedApps, uploadedFiles...) - // Upload apps to S3 for second Standalone - testcaseEnvInst.Log.Info("Upload apps to S3 for 2nd Standalone") - s3TestDirStandalone2 := "s1appfw-2-" + testenv.RandomDNSName(4) + // Upload apps to GCS for second Standalone + testcaseEnvInst.Log.Info("Upload apps to GCS for 2nd Standalone") + gcsTestDirStandalone2 := "s1appfw-2-" + testenv.RandomDNSName(4) appFileListStandalone2 := testenv.GetAppFileList(appList2) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDirStandalone2, appFileListStandalone2, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload apps to S3 test directory") + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDirStandalone2, appFileListStandalone2, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload apps to GCS test directory") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework Spec appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -1152,7 +1152,7 @@ var _ = Describe("s1appfw test", func() { // Create App framework Spec appSourceNameStandalone2 := "appframework-2-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) appSourceVolumeNameStandalone2 := "appframework-test-volume-2-" + testenv.RandomDNSName(3) - appFrameworkSpecStandalone2 := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameStandalone2, enterpriseApi.ScopeLocal, appSourceNameStandalone2, s3TestDirStandalone2, 60) + appFrameworkSpecStandalone2 := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameStandalone2, enterpriseApi.ScopeLocal, appSourceNameStandalone2, gcsTestDirStandalone2, 60) specStandalone2 := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -1195,33 +1195,33 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCS for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console with app framework and wait for the pod to be ready - * Upload big-size app to S3 for Standalone + * Upload big-size app to GCS for Standalone * Create app source for Standalone * Prepare and deploy Standalone ############## VERIFICATIONS ################ * Verify App installation is in progress on Standalone - * Upload more apps from S3 during bigger app install + * Upload more apps from GCS during bigger app install * Wait for polling interval to pass * Verify all apps are installed on Standalone */ // ################## SETUP FOR MONITORING CONSOLE #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCS for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) - s3TestDirMC := "s1appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Monitoring Console", appVersion)) + gcsTestDirMC := "s1appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Monitoring Console %s", appVersion, testGCSBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework spec for Monitoring Console appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -1242,23 +1242,23 @@ var _ = Describe("s1appfw test", func() { testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) // ################## SETUP FOR STANDALONE #################### - // Download all test apps from S3 + // Download all test apps from GCS appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList = testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps") - // Upload big-size app to S3 for Standalone + // Upload big-size app to GCS for Standalone appList = testenv.BigSingleApp appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Standalone") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Standalone") + testcaseEnvInst.Log.Info("Upload big-size app to GCS for Standalone") + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCS test directory for Standalone") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework spec for Standalone appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -1280,12 +1280,12 @@ var _ = Describe("s1appfw test", func() { // Verify App installation is in progress on Standalone testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), standalone.Kind, appSourceName, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyComplete) - // Upload more apps to S3 for Standalone + // Upload more apps to GCS for Standalone appList = testenv.ExtraApps appFileList = testenv.GetAppFileList(appList) - testcaseEnvInst.Log.Info("Upload more apps to S3 for Standalone") - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload more apps to S3 test directory for Standalone") + testcaseEnvInst.Log.Info("Upload more apps to GCS for Standalone") + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload more apps to GCS test directory for Standalone") uploadedApps = append(uploadedApps, uploadedFiles...) // Wait for Standalone to be in READY status @@ -1307,34 +1307,34 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload big-size app to S3 for Standalone + * Upload big-size app to GCS for Standalone * Create app source for Standalone * Prepare and deploy Standalone * While app install is in progress, restart the operator ############## VERIFICATIONS ################ * Verify App installation is in progress on Standalone - * Upload more apps from S3 during bigger app install + * Upload more apps from GCS during bigger app install * Wait for polling interval to pass * Verify all apps are installed on Standalone */ // ################## SETUP FOR STANDALONE #################### - // Download all test apps from S3 + // Download all test apps from GCS appVersion := "V1" appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps") - // Upload big-size app to S3 for Standalone - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Standalone") - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Standalone") + // Upload big-size app to GCS for Standalone + testcaseEnvInst.Log.Info("Upload big-size app to GCS for Standalone") + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCS test directory for Standalone") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework spec for Standalone appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -1403,34 +1403,34 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload big-size app to S3 for Standalone + * Upload big-size app to GCS for Standalone * Create app source for Standalone * Prepare and deploy Standalone * While app download is in progress, restart the operator ############## VERIFICATIONS ################ * Verify App download is in progress on Standalone - * Upload more apps from S3 during bigger app install + * Upload more apps from GCS during bigger app install * Wait for polling interval to pass * Verify all apps are installed on Standalone */ // ################## SETUP FOR STANDALONE #################### - // Download all test apps from S3 + // Download all test apps from GCS appVersion := "V1" appList := append(testenv.BigSingleApp, testenv.ExtraApps...) appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps") - // Upload big-size app to S3 for Standalone - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Standalone") - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Standalone") + // Upload big-size app to GCS for Standalone + testcaseEnvInst.Log.Info("Upload big-size app to GCS for Standalone") + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCS test directory for Standalone") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework spec for Standalone appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -1471,7 +1471,7 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Standalone + * Upload V1 apps to GCS for Standalone * Create app source for Standalone * Prepare and deploy Standalone with app framework and wait for the pod to be ready ############ VERIFICATION########### @@ -1484,17 +1484,17 @@ var _ = Describe("s1appfw test", func() { * Verify no pod resets triggered due to app install * Verify App enabled and version by running splunk cmd * Disable the app - * Delete the app from S3 + * Delete the app from GCS * Check for repo state in App Deployment Info */ // ################## SETUP FOR STANDALONE #################### - // Upload V1 apps to S3 for Standalone + // Upload V1 apps to GCS for Standalone appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Standalone", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Standalone", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Maximum apps to be downloaded in parallel @@ -1502,7 +1502,7 @@ var _ = Describe("s1appfw test", func() { // Create App framework spec for Standalone appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) appFrameworkSpec.MaxConcurrentAppDownloads = uint64(maxConcurrentAppDownloads) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -1531,13 +1531,13 @@ var _ = Describe("s1appfw test", func() { allAppSourceInfo := []testenv.AppSourceInfo{standaloneAppSourceInfo} testenv.AppFrameWorkVerifications(ctx, deployment, testcaseEnvInst, allAppSourceInfo, splunkPodAge, "") - // Verify repo state on App to be disabled to be 1 (i.e app present on S3 bucket) + // Verify repo state on App to be disabled to be 1 (i.e app present on GCS bucket) appName := appListV1[0] appFileName := testenv.GetAppFileList([]string{appName}) testenv.VerifyAppRepoState(ctx, deployment, testcaseEnvInst, standalone.Name, standalone.Kind, appSourceName, 1, appFileName[0]) // Disable the app - testenv.DisableAppsToS3(downloadDirV1, appFileName, s3TestDir) + testenv.DisableAppsToGCP(downloadDirV1, appFileName, gcsTestDir) // Check for changes in App phase to determine if next poll has been triggered testenv.WaitforPhaseChange(ctx, deployment, testcaseEnvInst, deployment.GetName(), standalone.Kind, appSourceName, appFileName) @@ -1549,23 +1549,23 @@ var _ = Describe("s1appfw test", func() { standalonePodName := fmt.Sprintf(testenv.StandalonePod, deployment.GetName(), 0) testenv.WaitforAppInstallState(ctx, deployment, testcaseEnvInst, []string{standalonePodName}, testcaseEnvInst.GetName(), appName, "disabled", false) - // Delete the file from S3 - s3Filepath := filepath.Join(s3TestDir, appFileName[0]) - err = testenv.DeleteFileOnS3(testS3Bucket, s3Filepath) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to delete %s app on S3 test directory", appFileName[0])) + // Delete the file from GCS + gcsFilepath := filepath.Join(gcsTestDir, appFileName[0]) + err = testenv.DeleteFileOnGCP(testGCSBucket, gcsFilepath) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to delete %s app on GCS test directory", appFileName[0])) - // Verify repo state is set to 2 (i.e app deleted from S3 bucket) + // Verify repo state is set to 2 (i.e app deleted from GCS bucket) testenv.VerifyAppRepoState(ctx, deployment, testcaseEnvInst, standalone.Name, standalone.Kind, appSourceName, 2, appFileName[0]) }) }) Context("Standalone deployment (S1) with App Framework", func() { - It("integrationgcp, s1gcp, appframeworks1gcp, appframeworkgcp: can deploy a Standalone instance with App Framework enabled, attempt to update using incorrect S3 credentials", func() { + It("integrationgcp, s1gcp, appframeworks1gcp, appframeworkgcp: can deploy a Standalone instance with App Framework enabled, attempt to update using incorrect GCS credentials", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Standalone + * Upload V1 apps to GCS for Standalone * Create app source for Standalone * Prepare and deploy Standalone with app framework and wait for the pod to be ready ############ V1 APP VERIFICATION FOR STANDALONE########### @@ -1581,7 +1581,7 @@ var _ = Describe("s1appfw test", func() { * Create App framework volume with random credentials and apply to Spec * Check for changes in App phase to determine if next poll has been triggered ############ UPGRADE V2 APPS ########### - * Upload V2 apps to S3 App Source + * Upload V2 apps to GCS App Source * Check no apps are updated as auth key is incorrect ############ Modify secret key to correct one########### * Apply spec with correct credentails @@ -1598,12 +1598,12 @@ var _ = Describe("s1appfw test", func() { */ // ################## SETUP FOR STANDALONE #################### - // Upload V1 apps to S3 for Standalone + // Upload V1 apps to GCS for Standalone appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Standalone", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Standalone", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Maximum apps to be downloaded in parallel @@ -1611,7 +1611,7 @@ var _ = Describe("s1appfw test", func() { // Create App framework spec for Standalone appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) appFrameworkSpec.MaxConcurrentAppDownloads = uint64(maxConcurrentAppDownloads) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -1632,7 +1632,7 @@ var _ = Describe("s1appfw test", func() { secretStruct, err := testenv.GetSecretStruct(ctx, deployment, testcaseEnvInst.GetName(), secretref) Expect(err).To(Succeed(), "Unable to obtain secret object") secretData := secretStruct.Data - modifiedSecretData := map[string][]byte{"s3_access_key": []byte(testenv.RandomDNSName(5)), "s3_secret_key": []byte(testenv.RandomDNSName(5))} + modifiedSecretData := map[string][]byte{"gcs_access_key": []byte(testenv.RandomDNSName(5)), "gcs_secret_key": []byte(testenv.RandomDNSName(5))} // Wait for Standalone to be in READY status testenv.StandaloneReady(ctx, deployment, deployment.GetName(), standalone, testcaseEnvInst) @@ -1653,18 +1653,18 @@ var _ = Describe("s1appfw test", func() { Expect(err).To(Succeed(), "Unable to update secret Object") // ############## UPGRADE APPS ################# - // Delete apps on S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on S3", appVersion)) - testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps) + // Delete apps on + testcaseEnvInst.Log.Info(fmt.Sprintf("Delete %s apps on GCS", appVersion)) + testenv.DeleteFilesOnGCP(testGCSBucket, uploadedApps) uploadedApps = nil - // Upload V2 apps to S3 for Standalone + // Upload V2 apps to GCS for Standalone appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Standalone", appVersion)) appFileList = testenv.GetAppFileList(appListV2) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Standalone", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Check for changes in App phase to determine if next poll has been triggered @@ -1702,13 +1702,13 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload app to S3 for Standalone + * Upload app to GCS for Standalone * Create app source for Standalone * Prepare and deploy Standalone * While app download is completed, upload new versions of the apps ############## VERIFICATIONS ################ * Verify App download is in completed on Standalone - * Upload updated app to S3 as pervious app download is complete + * Upload updated app to GCS as pervious app download is complete * Verify app is installed on Standalone ############## UPGRADE VERIFICATIONS ################ * Wait for next poll to trigger on Standalone @@ -1716,22 +1716,22 @@ var _ = Describe("s1appfw test", func() { */ // ################## SETUP FOR STANDALONE #################### - // Download test app from S3 + // Download test app from GCS appVersion := "V1" appListV1 := []string{appListV1[0]} appFileList := testenv.GetAppFileList(appListV1) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download apps") - // Upload apps to S3 for Standalone - testcaseEnvInst.Log.Info("Upload apps to S3 for Standalone") - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload app to S3 test directory for Standalone") + // Upload apps to GCS for Standalone + testcaseEnvInst.Log.Info("Upload apps to GCS for Standalone") + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload app to GCS test directory for Standalone") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework spec for Standalone appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 120) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 120) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -1750,13 +1750,13 @@ var _ = Describe("s1appfw test", func() { // Verify App download is in progress on Standalone testenv.VerifyAppState(ctx, deployment, testcaseEnvInst, deployment.GetName(), standalone.Kind, appSourceName, appFileList, enterpriseApi.AppPkgInstallComplete, enterpriseApi.AppPkgPodCopyPending) - // Upload V2 apps to S3 for Standalone + // Upload V2 apps to GCS for Standalone appVersion = "V2" - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s app to S3 for Standalone", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s app to GCS for Standalone", appVersion)) appFileList = testenv.GetAppFileList([]string{appListV2[0]}) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV2) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s app to S3 test directory for Standalone", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV2) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s app to GCS test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) //######### VERIFICATIONS ############# @@ -1787,7 +1787,7 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### * Create a file on operator to utilize over 1G of space - * Upload file to s3 for standalone + * Upload file to gcs for standalone * Create app source for Standalone with parallelDownload=15 * Prepare and deploy Standalone with app framework and wait for the pod to be ready ############### VERIFICATION ################ @@ -1811,13 +1811,13 @@ var _ = Describe("s1appfw test", func() { appVersion := "V1" appList := testenv.PVTestApps appFileList := testenv.GetAppFileList(appList) - err = testenv.DownloadFilesFromGCP(testDataS3Bucket, s3PVTestApps, downloadDirPVTestApps, appFileList) + err = testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsPVTestApps, downloadDirPVTestApps, appFileList) Expect(err).To(Succeed(), "Unable to download app files") - // Upload apps to S3 - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone", appVersion)) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirPVTestApps) - Expect(err).To(Succeed(), "Unable to upload apps to S3 test directory") + // Upload apps to GCS + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Standalone", appVersion)) + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirPVTestApps) + Expect(err).To(Succeed(), "Unable to upload apps to GCS test directory") uploadedApps = append(uploadedApps, uploadedFiles...) // Maximum apps to be downloaded in parallel @@ -1825,7 +1825,7 @@ var _ = Describe("s1appfw test", func() { // Create App framework Spec appSourceName := "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) appFrameworkSpec.MaxConcurrentAppDownloads = uint64(maxConcurrentAppDownloads) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ @@ -1861,34 +1861,34 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload big-size app to S3 for Standalone + * Upload big-size app to GCS for Standalone * Create app source for Standalone * Prepare and deploy Standalone * When app download is complete, delete apps from app directory ############## VERIFICATIONS ################ * Verify App installation is in progress on Standalone - * Upload more apps from S3 during bigger app install + * Upload more apps from GCS during bigger app install * Wait for polling interval to pass * Verify all apps are installed on Standalone */ // ################## SETUP FOR STANDALONE #################### - // Download big size apps from S3 + // Download big size apps from GCS appVersion := "V1" appList := testenv.BigSingleApp appFileList := testenv.GetAppFileList(appList) - err := testenv.DownloadFilesFromGCP(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList) + err := testenv.DownloadFilesFromGCP(testDataGcsBucket, gcsAppDirV1, downloadDirV1, appFileList) Expect(err).To(Succeed(), "Unable to download big app") - // Upload big-size app to S3 for Standalone - testcaseEnvInst.Log.Info("Upload big-size app to S3 for Standalone") - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), "Unable to upload big-size app to S3 test directory for Standalone") + // Upload big-size app to GCS for Standalone + testcaseEnvInst.Log.Info("Upload big-size app to GCS for Standalone") + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), "Unable to upload big-size app to GCS test directory for Standalone") uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework spec for Standalone appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -1932,12 +1932,12 @@ var _ = Describe("s1appfw test", func() { /* Test Steps ################## SETUP #################### - * Upload V1 apps to S3 for Monitoring Console + * Upload V1 apps to GCS for Monitoring Console * Create app source for Monitoring Console * Prepare and deploy Monitoring Console with app framework * Check isDeploymentInProgress is set for Monitoring Console CR * Wait for the pod to be ready - * Upload V1 apps to S3 for Standalone + * Upload V1 apps to GCS for Standalone * Create app source for Standalone * Prepare and deploy Standalone with app framework * Check isDeploymentInProgress is set for Monitoring Console CR @@ -1946,20 +1946,20 @@ var _ = Describe("s1appfw test", func() { // ################## SETUP FOR MONITORING CONSOLE #################### - // Upload V1 apps to S3 for Monitoring Console + // Upload V1 apps to GCS for Monitoring Console appVersion := "V1" appFileList := testenv.GetAppFileList(appListV1) - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Monitoring Console", appVersion)) + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Monitoring Console", appVersion)) - s3TestDirMC := "s1appfw-mc-" + testenv.RandomDNSName(4) - uploadedFiles, err := testenv.UploadFilesToGCP(testS3Bucket, s3TestDirMC, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Monitoring Console %s", appVersion, testS3Bucket)) + gcsTestDirMC := "s1appfw-mc-" + testenv.RandomDNSName(4) + uploadedFiles, err := testenv.UploadFilesToGCP(testGCSBucket, gcsTestDirMC, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Monitoring Console %s", appVersion, testGCSBucket)) uploadedApps = append(uploadedApps, uploadedFiles...) // Create App framework spec for Monitoring Console appSourceNameMC := "appframework-" + enterpriseApi.ScopeLocal + "mc-" + testenv.RandomDNSName(3) appSourceVolumeNameMC := "appframework-test-volume-mc-" + testenv.RandomDNSName(3) - appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, s3TestDirMC, 60) + appFrameworkSpecMC := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeNameMC, enterpriseApi.ScopeLocal, appSourceNameMC, gcsTestDirMC, 60) mcSpec := enterpriseApi.MonitoringConsoleSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{ Spec: enterpriseApi.Spec{ @@ -1984,10 +1984,10 @@ var _ = Describe("s1appfw test", func() { testenv.VerifyMonitoringConsoleReady(ctx, deployment, deployment.GetName(), mc, testcaseEnvInst) // ################## SETUP FOR STANDALONE #################### - // Upload V1 apps to S3 for Standalone - testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to S3 for Standalone", appVersion)) - uploadedFiles, err = testenv.UploadFilesToGCP(testS3Bucket, s3TestDir, appFileList, downloadDirV1) - Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to S3 test directory for Standalone", appVersion)) + // Upload V1 apps to GCS for Standalone + testcaseEnvInst.Log.Info(fmt.Sprintf("Upload %s apps to GCS for Standalone", appVersion)) + uploadedFiles, err = testenv.UploadFilesToGCP(testGCSBucket, gcsTestDir, appFileList, downloadDirV1) + Expect(err).To(Succeed(), fmt.Sprintf("Unable to upload %s apps to GCS test directory for Standalone", appVersion)) uploadedApps = append(uploadedApps, uploadedFiles...) // Maximum apps to be downloaded in parallel @@ -1995,7 +1995,7 @@ var _ = Describe("s1appfw test", func() { // Create App framework spec for Standalone appSourceName = "appframework-" + enterpriseApi.ScopeLocal + testenv.RandomDNSName(3) - appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, s3TestDir, 60) + appFrameworkSpec := testenv.GenerateAppFrameworkSpec(ctx, testcaseEnvInst, appSourceVolumeName, enterpriseApi.ScopeLocal, appSourceName, gcsTestDir, 60) appFrameworkSpec.MaxConcurrentAppDownloads = uint64(maxConcurrentAppDownloads) spec := enterpriseApi.StandaloneSpec{ CommonSplunkSpec: enterpriseApi.CommonSplunkSpec{