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: add longform boolean unit tests #1186

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

coderbirju
Copy link
Contributor

Issue #, if available:

Description of changes:

Testing done:

  • I've reviewed the guidance in CONTRIBUTING.md

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@coderbirju coderbirju force-pushed the add-longform-unit branch 4 times, most recently from 1d9e868 to 259a8c7 Compare November 18, 2024 18:27
@coderbirju coderbirju marked this pull request as ready for review November 18, 2024 18:27
@coderbirju coderbirju force-pushed the add-longform-unit branch 4 times, most recently from 56ac24c to 60a51c4 Compare November 18, 2024 19:44
@@ -1171,6 +1171,37 @@ func TestNerdctlCommand_run(t *testing.T) {
c.EXPECT().Run()
},
},
{
Copy link
Contributor

Choose a reason for hiding this comment

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

we should include all long form flags supported by nerdctl in the check, irrespective of the ones present in our dictionary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

--debug                   
--debug-full
--experimental
--insecure-registry
--attach
--detach
--interactive
--oom-kill-disable
--privileged
--read-only
--init
--rm
--sig-proxy
--tty

These are the long form boolean commands available on nerdctl. (nerdctl run --help | grep -- '--' | grep -v -E 'string|int|float|uint|uint16' | grep -v '=')

I have included everything except

--debug - since debug-full is already present
--insecure-registry - this is a pull specific flag
--attach - contradicts detach

It is important to note that certain global commands --experimental and --debug-full result in the boolean value being sent as argument instead of an equality sign (e.g --debug-full false), it is valid nerdctl command though. Just something to note.

@coderbirju coderbirju force-pushed the add-longform-unit branch 9 times, most recently from a8e1094 to 87b99bd Compare November 20, 2024 20:17
Signed-off-by: Arjun Raja Yogidas <[email protected]>
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.

3 participants