Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BATS test to verify spin plugins and templates are installed #6884

Merged
merged 1 commit into from
May 15, 2024

Conversation

jandubois
Copy link
Member

@jandubois jandubois commented May 15, 2024

Passes BATS on CI: https://github.com/rancher-sandbox/rancher-desktop/actions/runs/9102407767

Additional manual BATS runs on Windows (with tunneling network, without using windows exes):

$ RD_USE_WINDOWS_EXE=1 RD_USE_NETWORKING_TUNNEL=1 ./bats-core/bin/bats -T tests/utils/*
spin.bats
   ===== utils/spin =====
 ✓ delete spin plugins and templates [336]                                                                     Install location:         system
   Resources path:           /mnt/c/Program Files/Rancher Desktop/resources/resources

   Container engine:         containerd
   Mount type:
   Using image allow list:   false
   Using Windows executables: true
   Using networking tunnel:  true

   Capturing logs:           false
   Tracing execution:        false
   Taking screenshots:       false
   Using ghcr.io images:     false
 ✓ confirm the spin directory is gone [134]
 ✓ start container engine with wasm support enabled [55349]
 ✓ plugins are installed [254]
 ✓ templates are installed [203]

5 tests, 0 failures in 81 seconds

$ RD_USE_NETWORKING_TUNNEL=1 ./bats-core/bin/bats -T tests/utils/*
spin.bats
   ===== utils/spin =====
 ✓ delete spin plugins and templates [246]                                                                     Install location:         system
   Resources path:           /mnt/c/Program Files/Rancher Desktop/resources/resources

   Container engine:         containerd
   Mount type:
   Using image allow list:   false
   Using Windows executables: false
   Using networking tunnel:  true

   Capturing logs:           false
   Tracing execution:        false
   Taking screenshots:       false
   Using ghcr.io images:     false
 ✓ confirm the spin directory is gone [81]
 ✓ start container engine with wasm support enabled [44931]
 ✓ plugins are installed [132]
 ✓ templates are installed [200]

5 tests, 0 failures in 65 seconds

@jandubois jandubois force-pushed the bats-spin-cli branch 2 times, most recently from 96c0ce3 to bb4daff Compare May 15, 2024 00:42
@jandubois jandubois linked an issue May 15, 2024 that may be closed by this pull request
@jandubois jandubois force-pushed the bats-spin-cli branch 3 times, most recently from 76c069e to f434d92 Compare May 15, 2024 20:41
@jandubois jandubois requested a review from mook-as May 15, 2024 21:29
mook-as
mook-as previously approved these changes May 15, 2024
Comment on lines 1506 to 1509
// When running without wsl-exec the command cannot resolve DNS names:
// # wsl-exec curl http://github.com
// # curl http://github.com
// curl: (6) Could not resolve host: github.com
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to include the log in the comment:

Suggested change
// When running without wsl-exec the command cannot resolve DNS names:
// # wsl-exec curl http://github.com
// # curl http://github.com
// curl: (6) Could not resolve host: github.com
// wsl-exec is needed to correctly resolve DNS names.

bats/tests/utils/spin.bats Show resolved Hide resolved
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
@mook-as mook-as enabled auto-merge May 15, 2024 23:04
@mook-as mook-as merged commit 58b55e3 into rancher-sandbox:main May 15, 2024
15 checks passed
@jandubois jandubois deleted the bats-spin-cli branch May 17, 2024 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create BATS test for spinkube operator
2 participants