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 version subcommand and CLI parser #20

Merged
merged 1 commit into from Jul 2, 2020
Merged

Add version subcommand and CLI parser #20

merged 1 commit into from Jul 2, 2020

Conversation

saschagrunert
Copy link
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

To be able to identify the seccomp operator build appropriately we now
provide a version,v command.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

- Added `version,v` subcommand and CLI parser (`--version` works too now)

@saschagrunert saschagrunert force-pushed the version branch 4 times, most recently from eddf70d to cc93be2 Compare June 27, 2020 18:57
@saschagrunert
Copy link
Member Author

@hasheddan @pjbgf please take a look :)

Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

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

Just a small nit around test coverage, but overall go to go.

/lgtm

require.NotEmpty(t, sut.String())
}

func TestVersionJSON(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: would be nice to have tests for unknown versions and also when the version is known.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm this is done via the $LDVARS so I'm not sure how exactly test both cases. In any case I added the vars to the test-unit target so we now can check that they're not empty per default.

@saschagrunert saschagrunert force-pushed the version branch 2 times, most recently from 22e546e to d01f54b Compare June 28, 2020 13:24
To be able to identify the seccomp operator build appropriately we now
provide a `version,v` command.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
@saschagrunert saschagrunert merged commit 59af123 into master Jul 2, 2020
@saschagrunert saschagrunert deleted the version branch July 2, 2020 12:35
jhrozek pushed a commit to jhrozek/security-profiles-operator that referenced this pull request Dec 16, 2022
OCPBUGS-3690: profilerecorder: gracefully skip containers that did not record anything
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.

None yet

2 participants