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

chore(test): Add configurable opts to e2e tests #239

Merged
merged 3 commits into from
Nov 11, 2021

Conversation

Callisto13
Copy link
Member

@Callisto13 Callisto13 commented Nov 9, 2021

I have added the initial frame for custom test flags.
So far just the options to:

  • Skip setting up the devmapper thinpool
  • Skip deleting VMs
  • Skip all teardown steps
  • Set log level for containerd
  • Set log level for flintlockd

Unfortunately custom test flags can only be added on init() which is
bleh but I don't see another nice was of doing this.

These flags can only be used while running go test ... directly.
This means you cannot pass in flags as part of a make or a
docker run -it ... command, but you can just call go test etc from inside the
container or in the metal host and configure what you like.

My next step is some more work around the python tooling so that these
(and more) options can be passed up.

part of #146

@Callisto13
Copy link
Member Author

Callisto13 commented Nov 9, 2021

@yitsushi is the test failure i am seeing vv the thing that a commit in your iface pr is going to fix?

@yitsushi
Copy link
Contributor

@yitsushi is the test failure i am seeing vv the thing that a commit in your iface pr is going to fix?

Hopefully. I did not see errors yet on my branch. And it has much better error message instead of a huge timeout panic.

@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2021

Codecov Report

Merging #239 (e70071d) into main (fe9bb9f) will decrease coverage by 15.18%.
The diff coverage is 65.16%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main     #239       +/-   ##
===========================================
- Coverage   55.81%   40.63%   -15.19%     
===========================================
  Files          44       46        +2     
  Lines        2012     2146      +134     
===========================================
- Hits         1123      872      -251     
- Misses        781     1214      +433     
+ Partials      108       60       -48     
Impacted Files Coverage Δ
core/application/commands.go 71.66% <ø> (+2.70%) ⬆️
infrastructure/network/network_service.go 0.00% <0.00%> (ø)
pkg/planner/actuator.go 86.20% <ø> (ø)
pkg/validation/validate.go 100.00% <ø> (+12.50%) ⬆️
core/plans/microvm_create_update.go 57.53% <36.36%> (+2.65%) ⬆️
infrastructure/network/errors.go 50.00% <50.00%> (ø)
core/steps/network/interface_delete.go 90.90% <73.33%> (-9.10%) ⬇️
core/steps/network/interface_create.go 93.22% <75.00%> (-3.08%) ⬇️
infrastructure/network/utils.go 76.92% <76.92%> (ø)
core/plans/microvm_delete.go 60.00% <83.33%> (+3.13%) ⬆️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6bcae78...e70071d. Read the comment docs.

yitsushi
yitsushi previously approved these changes Nov 11, 2021
@Callisto13
Copy link
Member Author

ffs since i cannot comment inline apparently: the action update should have been an && not an || but i will fix later when i add docs

I have added the initial frame for custom test flags.
So far just the options to:
- Skip setting up the devmapper thinpool
- Skip deleting VMs
- Skip all teardown steps
- Set log level for containerd
- Set log level for flintlockd

Unfortunately custom test flags can only be added on `init()` which is
bleh but I don't see another nice was of doing this.

These flags can only be used while running `go test ...` directly.
This means you cannot pass in flags as part of a `make` or a
`docker run -it ...` command, but you can just call `go test etc` from inside the
container or in the metal host and configure what you like.

My next step is some more work around the python tooling so that these
(and more) options can be passed up.
@@ -8,6 +8,7 @@ on:
jobs:
e2e:
runs-on: ubuntu-latest
if: ${{ secrets.METAL_AUTH_TOKEN != '' && secrets.EQUINIX_ORG_ID != '' }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Tried to add a similar check on the docs publish job, but secrets can't be used in condition.

actions/runner#520

Copy link
Contributor

Choose a reason for hiding this comment

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

This logic is a valid workaround:

    if: ${{ github.event_name != 'pull_request' && github.repository_owner == 'weaveworks' }}

Copy link
Member Author

Choose a reason for hiding this comment

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

boooo stack overflow lied to me 😭

okay ty

@Callisto13 Callisto13 merged commit 1980c5c into liquidmetal-dev:main Nov 11, 2021
@Callisto13 Callisto13 deleted the test-params branch November 11, 2021 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants