Skip to content

Auto-detect Singularity images#142

Merged
kzantow merged 4 commits into
anchore:mainfrom
tri-adam:detect-singularity
Sep 21, 2022
Merged

Auto-detect Singularity images#142
kzantow merged 4 commits into
anchore:mainfrom
tri-adam:detect-singularity

Conversation

@tri-adam
Copy link
Copy Markdown
Contributor

@tri-adam tri-adam commented Sep 1, 2022

Modify detectSourceFromPath to auto-detect Singularity container images. Re-factor pkg/image unit tests to accommodate more thorough SIF test cases, and extend unit tests to cover new functionality.

I believe this may address anchore/syft#1189.

Re-factor helper functions used to set up in-memory filesystems used in
unit tests.

Signed-off-by: Adam Hughes <9903835+tri-adam@users.noreply.github.com>
Modify detectSourceFromPath to auto-detect Singularity container images.
Extend unit tests to cover new functionality.

Signed-off-by: Adam Hughes <9903835+tri-adam@users.noreply.github.com>
Comment thread pkg/image/source_test.go Outdated
Signed-off-by: Adam Hughes <9903835+tri-adam@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@kzantow kzantow 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 couple more comments here -- hopefully which make sense! I'm thinking about maintenance and having a pattern of returning callbacks makes things a bit harder to debug from my experience.

Comment thread pkg/image/source_test.go Outdated
Comment thread pkg/image/source_test.go Outdated
Return afero.Fs directly from dummy functions, as per code review
feedback.

Signed-off-by: Adam Hughes <9903835+tri-adam@users.noreply.github.com>
@tri-adam tri-adam requested a review from kzantow September 20, 2022 15:30
Copy link
Copy Markdown
Contributor

@kzantow kzantow left a comment

Choose a reason for hiding this comment

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

LGTM -- just one more minor comment

Comment thread pkg/image/source_test.go
@kzantow kzantow merged commit 5655277 into anchore:main Sep 21, 2022
@kzantow
Copy link
Copy Markdown
Contributor

kzantow commented Sep 21, 2022

Thanks for the contribution, @tri-adam!

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.

2 participants