Skip to content

Commit

Permalink
Integration-test: Remove embedded as bundle path
Browse files Browse the repository at this point in the history
Since now there is no bundle embedded so better to update the reference
and also run setup command with bundle option if bundle path is present.
  • Loading branch information
praveenkumar committed Mar 7, 2022
1 parent ba4f9b7 commit c1868ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
8 changes: 6 additions & 2 deletions test/integration/resize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ var _ = Describe("vary VM parameters: memory cpus, disk", func() {
Describe("use default values", func() {

It("setup CRC", func() {
Expect(RunCRCExpectSuccess("setup")).To(ContainSubstring("Your system is correctly setup for using CodeReady Containers"))
if bundlePath == "" {
Expect(RunCRCExpectSuccess("setup")).To(ContainSubstring("Your system is correctly setup for using CodeReady Containers"))
} else {
Expect(RunCRCExpectSuccess("setup", "-b", bundlePath)).To(ContainSubstring("Your system is correctly setup for using CodeReady Containers"))
}
})

It("start CRC", func() {
// default values: "--memory", "9216", "--cpus", "4", "disk-size", "31"
if bundlePath == "embedded" {
if bundlePath == "" {
Expect(RunCRCExpectSuccess("start", "-p", pullSecretPath)).To(ContainSubstring("Started the OpenShift cluster"))
} else {
Expect(RunCRCExpectSuccess("start", "-b", bundlePath, "-p", pullSecretPath)).To(ContainSubstring("Started the OpenShift cluster"))
Expand Down
11 changes: 3 additions & 8 deletions test/integration/testsuite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ type VersionAnswer struct {
Version string `json:"version"`
Commit string `json:"commit"`
OpenshiftVersion string `json:"openshiftVersion"`
Embedded bool `json:"embedded"`
}

var credPath string
Expand Down Expand Up @@ -54,13 +53,9 @@ var _ = BeforeSuite(func() {

Expect(err).NotTo(HaveOccurred())

// bundle location
bundlePath = "embedded"
if !versionInfo.Embedded {
bundlePath = os.Getenv("BUNDLE_PATH") // this env var should contain location of bundle or string "embedded"
if bundlePath != "embedded" { // if real bundle
Expect(bundlePath).To(BeAnExistingFile())
}
bundlePath = os.Getenv("BUNDLE_PATH") // this env var should contain location of bundle
if bundlePath != "" {
Expect(bundlePath).To(BeAnExistingFile())
}

// pull-secret location
Expand Down

0 comments on commit c1868ef

Please sign in to comment.