-
Notifications
You must be signed in to change notification settings - Fork 277
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 support for picking RD_LOCATION for BATS #4573
Conversation
@@ -21,11 +32,32 @@ factory_reset() { | |||
fi | |||
} | |||
|
|||
# Turn `rdctl start` arguments into `npm run dev` arguments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should consider making npm run dev
take the same arguments as rdctl start
instead. That's better for our sanity. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works for me too, but should be a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, definitely not as part of this PR.
70d2241
to
629f3ed
Compare
I see the same breakage on the main branch in macOS, so something else is going on outside this PR. Breakage:
If I run I don't see this breakage when running in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See note on breakage in #4573 (comment)
Please provide details on how to reproduce breakage; it works for me. Also, if this is using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the breakage I saw on this PR is also visible in main
, there's no reason to hold this PR back.
Choose from system/user/dist/npm or pick first available. dist and npm only work when running from inside a git clone. npm is not yet supported on Windows. Also move "load ../helpers/load" from setup() to top level, so we can abort on fatal errors. Predefine teardown_file() with `rdctl shutdown` so it doesn't have to be repeated in every test file. Signed-off-by: Jan Dubois <jan.dubois@suse.com>
Choose from system/user/dist/npm or pick first available. dist and npm only work when running from inside a git clone. npm is not yet supported on Windows.
Also move "load ../helpers/load" from setup() to top level, so we can abort on fatal errors.
Predefine teardown_file() with
rdctl shutdown
so it doesn't have to be repeated in every test file.Partially implements #4542 but more work is needed.
Additional comments
./bats-core/bin/bats tests/*
passed successfully on macOS Intel for both "moby" and "containerd":158 tests, 0 failures, 5 skipped
.You can tell BATS to use the package in the
dist
directory even when RD is also installed globally, or per user:I'm not really happy with the
RD_LOCATION
name, but couldn't think of anything better. I briefly consideredRD_INSTALL
, but that seems even worse.Using
RD_LOCATION=npm
has been tested with theregistry/creds.bats
test, which does run a second factory-reset in the middle:The factory reset logic should be made more robust (e.g. I've seen it once that limactl/qemu were not killed), and needs to be implemented for Windows. This should happen in a separate PR.
The
apify_arg()
function should be auto-generated from the schema incommand-api.yaml
. This too should happen in a separate PR.