Skip to content

Commit

Permalink
Test changes for podman preset removal
Browse files Browse the repository at this point in the history
- change preset to microshift for podman bundle tests
- change preset to microshift in github workflow
- remove crc start from github workflow to avoid auth error
  • Loading branch information
vyasgun authored and cfergeau committed Apr 22, 2024
1 parent 8f83eae commit 5263690
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 26 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/macos-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ jobs:
path: "./out/macos-universal/crc-macos-installer.pkg"
- name: Install crc pkg
run: sudo installer -pkg out/macos-universal/crc-macos-installer.pkg -target /
- name: Set podman preset as part of config
run: crc config set preset podman
- name: Set microshift preset as part of config
run: crc config set preset microshift
- name: Run crc setup command
run: crc setup
- name: Wait 10 sec for the daemon to serve
run: sleep 10
- name: Run crc with podman preset
run: crc start
run: crc setup
1 change: 0 additions & 1 deletion test/e2e/features/minimal.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Feature: Minimal user story

Examples:
| preset-value |
| podman |
| microshift |
| openshift |

8 changes: 0 additions & 8 deletions test/e2e/features/proxy.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,3 @@ Feature: Behind proxy test
And executing "eval $(crc oc-env)" succeeds
When checking that CRC is running
Then login to the oc cluster succeeds

# inherits @proxy tag from Feature
@cleanup @podman-preset
Scenario: Cache podman bundle behind proxy under podman preset
* removing podman bundle from cache succeeds
* executing "crc config set preset podman" succeeds
When executing single crc setup command succeeds
Then executing "crc start" succeeds
9 changes: 2 additions & 7 deletions test/e2e/testsuite/testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,6 @@ func InitializeScenario(s *godog.ScenarioContext) {

for _, tag := range sc.Tags {

// if podman preset is activated, bundle will not be provided by the user
if tag.Name == "@podman-preset" {
userProvidedBundle = false
}

// copy data/config files to test dir
if tag.Name == "@testdata" {
err := util.CopyFilesToTestDir()
Expand Down Expand Up @@ -439,7 +434,7 @@ func InitializeScenario(s *godog.ScenarioContext) {
util.DownloadFileIntoLocation)
s.Step(`^writing text "([^"]*)" to file "([^"]*)" succeeds$`,
util.WriteToFile)
s.Step(`^removing (podman|openshift) bundle from cache succeeds$`,
s.Step(`^removing (openshift) bundle from cache succeeds$`,
RemoveBundleFromCache)

// File content checks
Expand Down Expand Up @@ -658,7 +653,7 @@ func FileExistsInCRCHome(fileName string) error {
return err
}

func RemoveBundleFromCache(_ string) error {
func RemoveBundleFromCache() error {

var p = preset.OpenShift

Expand Down
6 changes: 3 additions & 3 deletions test/integration/podman_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
. "github.com/onsi/gomega"
)

var _ = Describe("podman preset", Serial, Ordered, Label("podman-preset"), func() {
var _ = Describe("podman-remote", Serial, Ordered, Label("microshift-preset"), func() {

// runs 1x after all the It blocks (specs) inside this Describe node
AfterAll(func() {
Expand All @@ -28,15 +28,15 @@ var _ = Describe("podman preset", Serial, Ordered, Label("podman-preset"), func(
Describe("basic use", Serial, Ordered, func() {

It("write to config", func() {
Expect(RunCRCExpectSuccess("config", "set", "preset", "podman")).To(ContainSubstring("please run 'crc setup' before 'crc start'"))
Expect(RunCRCExpectSuccess("config", "set", "preset", "microshift")).To(ContainSubstring("please run 'crc setup' before 'crc start'"))
})

It("setup CRC", func() {
Expect(RunCRCExpectSuccess("setup")).To(ContainSubstring("Your system is correctly setup for using CRC"))
})

It("start CRC", func() {
Expect(RunCRCExpectSuccess("start")).To(ContainSubstring("podman runtime is now running"))
Expect(RunCRCExpectSuccess("start", "-p", pullSecretPath)).To(ContainSubstring("Started the MicroShift cluster"))
})

It("podman-env", func() {
Expand Down

0 comments on commit 5263690

Please sign in to comment.