Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions test/c3/appframework/appframework_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,18 +331,21 @@ var _ = Describe("c3appfw test", func() {
Context("Clustered deployment (C3 - clustered indexer, search head cluster)", func() {
It("appfwint, c3, appframework: can deploy a C3 SVA and have ES app installed on SHC", func() {

//Delete apps on S3 for new Apps
testenv.DeleteFilesOnS3(testS3Bucket, uploadedApps)
uploadedApps = nil

// ES is a huge file, we configure it here rather than in BeforeSuite/BeforeEach to save time for other tests
// Upload ES app to S3
esApp := []string{"SplunkEnterpriseSecuritySuite"}
appListV1 = append(appListV1, esApp...)
appFileList := testenv.GetAppFileList(appListV1, 1)
appFileList := testenv.GetAppFileList(esApp, 1)

// Download ES App from S3
err := testenv.DownloadFilesFromS3(testDataS3Bucket, s3AppDirV1, downloadDirV1, testenv.GetAppFileList(esApp, 1))
err := testenv.DownloadFilesFromS3(testDataS3Bucket, s3AppDirV1, downloadDirV1, appFileList)
Expect(err).To(Succeed(), "Unable to download ES app file")

// Upload ES app to S3
uploadedFiles, err := testenv.UploadFilesToS3(testS3Bucket, s3TestDir, testenv.GetAppFileList(esApp, 1), downloadDirV1)
uploadedFiles, err := testenv.UploadFilesToS3(testS3Bucket, s3TestDir, appFileList, downloadDirV1)
Expect(err).To(Succeed(), "Unable to upload ES app to S3 test directory")
uploadedApps = append(uploadedApps, uploadedFiles...)

Expand Down Expand Up @@ -413,15 +416,15 @@ var _ = Describe("c3appfw test", func() {
testenv.VerifyAppsDownloadedByInitContainer(deployment, testenvInstance, testenvInstance.GetName(), deployerPod, appFileList, initContDownloadLocation)

// Verify ES app is installed locally on SHC Deployer
testenv.VerifyAppInstalled(deployment, testenvInstance, testenvInstance.GetName(), deployerPod, esApp, false, "disabled", false, false)
testenv.VerifyAppInstalled(deployment, testenvInstance, testenvInstance.GetName(), deployerPod, esApp, true, "disabled", false, false)

// Verify apps are installed on SHs
podNames := []string{}
for i := 0; i < int(shSpec.Replicas); i++ {
sh := fmt.Sprintf(testenv.SearchHeadPod, deployment.GetName(), i)
podNames = append(podNames, string(sh))
}
testenv.VerifyAppInstalled(deployment, testenvInstance, testenvInstance.GetName(), podNames, appListV1, false, "enabled", false, true)
testenv.VerifyAppInstalled(deployment, testenvInstance, testenvInstance.GetName(), podNames, esApp, true, "enabled", false, true)
})
})

Expand Down
2 changes: 1 addition & 1 deletion test/s1/appframework/appframework_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ var _ = Describe("s1appfw test", func() {

appSourceDefaultSpec := enterpriseApi.AppSourceDefaultSpec{
VolName: volumeName,
Scope: enterpriseApi.ScopeClusterWithPreConfig,
Scope: enterpriseApi.ScopeLocal,
}
appSourceName := "appframework-" + testenv.RandomDNSName(3)
appSourceSpec := []enterpriseApi.AppSourceSpec{testenv.GenerateAppSourceSpec(appSourceName, s3TestDir, appSourceDefaultSpec)}
Expand Down
2 changes: 1 addition & 1 deletion test/testenv/s3utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func UploadFileToS3(dataBucket string, filename string, path string, file *os.Fi
}
logf.Log.Info("Uploaded", "filename", file.Name(), "bytes", numBytes)
}
return file.Name(), err
return filepath.Join(path, filename), err
}

// GetFileListOnS3 lists object in a bucket
Expand Down