Skip to content

Commit 4c77b76

Browse files
knqyf263simar7
andauthored
feat: support local filesystem and remote git repository (fanal#107)
* test(integration): move to the test directory * chore: update fixtures path * test: put common test images under the test directory * chore(Makefile): rename * feat: support local filesystem and remote git repository [PART 1] (fanal#109) * feat(walker): add tar/fs walker * fs_test: Add test names Signed-off-by: Simarpreet Singh <[email protected]> * walk_test: Add Test_isIgnored Signed-off-by: Simarpreet Singh <[email protected]> * feat: support local filesystem and remote git repository [PART 2] (fanal#110) * refactor(analyzer): merge OSAnalyzer, PkgAnalyze, LibAnalyzer into Analyzer * test: comment out temporarily * fix(amazon): check the length * fix(analyzer): make AnalysisResult a reference * library/analyzer: Refactor library analyzer code. Signed-off-by: Simarpreet Singh <[email protected]> * feat: support local filesystem and remote git repository [PART 3] (fanal#111) * refactor(image): move directory * feat(applier): add applier * fix(apk): replace extractor with applier * test: comment out temporarily * feat: support local filesystem and remote git repository [PART 4] (fanal#112) * feat(artifact): add image, local and remote artifact * image_test: Rename test field to use new convention Signed-off-by: Simarpreet Singh <[email protected]> * image_test: Add a test for put artifact failure Signed-off-by: Simarpreet Singh <[email protected]> * refactor(remote): remove unnecessary files for unit test * feat: support local filesystem and remote git repository [PART 5] (fanal#113) * test(integration): fix tests * feat: support local filesystem and remote git repository [PART 6] (fanal#114) * feat(main): add sub commands * refactor(types): remove unused type * chore(mod): update * test(artifact): add mock * fix(analyzer): redhat must be replaced with oracle * fix(analyzer): debian must be replaced with ubuntu * fix(fs): display dir when hostname is empty Co-authored-by: Simarpreet Singh <[email protected]> Co-authored-by: Simarpreet Singh <[email protected]> * fix: make AnalysisResult a reference Co-authored-by: Simarpreet Singh <[email protected]> * refactor(walker): fix comment Co-authored-by: Simarpreet Singh <[email protected]> Co-authored-by: Simarpreet Singh <[email protected]> Co-authored-by: Simarpreet Singh <[email protected]>
1 parent a1e818a commit 4c77b76

File tree

180 files changed

+3998
-2404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+3998
-2404
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
main
1515

1616
vendor
17-
integration/testdata/fixtures
17+
test/integration/testdata/fixtures
1818
cmd/fanal/fanal
1919
*.tar
2020
*.gz

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ lint: devel-deps
1515
cover: devel-deps
1616
goveralls
1717

18-
integration/testdata/fixtures/*.tar.gz:
19-
git clone https://github.com/aquasecurity/trivy-test-images.git integration/testdata/fixtures
18+
test/integration/testdata/fixtures/*.tar.gz:
19+
git clone https://github.com/aquasecurity/trivy-test-images.git test/integration/testdata/fixtures
2020

2121
.PHONY: test-integration
22-
test-integration: integration/testdata/fixtures/*.tar.gz
23-
go test -v -tags="integration" ./integration/...
22+
test-integration: test/integration/testdata/fixtures/*.tar.gz
23+
go test -v -tags="integration" ./test/integration/...
2424

2525
.PHONY: test-performance
26-
test-performance: integration/testdata/fixtures/*.tar.gz
27-
go test -v -benchtime=10x -run=^$$ -tags="performance" -bench=. ./integration/...
26+
test-performance: test/integration/testdata/fixtures/*.tar.gz
27+
go test -v -benchtime=10x -run=^$$ -tags="performance" -bench=. ./test/integration/...

0 commit comments

Comments
 (0)