generated from oracle/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add comparison test case for source finder vs analyzer
Signed-off-by: Ben Selwyn-Smith <[email protected]>
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
tests/integration/cases/latest_repo_comparison/check_output.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2024 - 2024, Oracle and/or its affiliates. All rights reserved. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. | ||
|
||
[[ "$(jq -r '.commit' output/reports/maven/io_avaje/avaje-prisms/avaje-prisms.source.json)" = "1f6f953df0b58f0c35b5e136f62f63ba7a22bc03" ]] && | ||
[[ "$(jq -r '.repo' output/reports/maven/io_avaje/avaje-prisms/avaje-prisms.source.json)" = "https://github.com/avaje/avaje-prisms" ]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright (c) 2024 - 2024, Oracle and/or its affiliates. All rights reserved. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. | ||
|
||
description: | | ||
Check that the find-source and analyze commands behave the same for a given artifact. | ||
tags: | ||
- macaron-python-package | ||
- macaron-docker-image | ||
|
||
steps: | ||
- name: Run macaron find source | ||
kind: find-source | ||
options: | ||
command_args: | ||
- -purl | ||
- pkg:maven/io.avaje/[email protected] | ||
- name: Check that the repository was not cloned | ||
kind: shell | ||
options: | ||
cmd: ls output/git_repos/github_com/avaje/avaje-prisms/ | ||
expect_fail: true | ||
- name: Check the report contents | ||
kind: shell | ||
options: | ||
cmd: ./check_output.sh | ||
- name: Run macaron analyze | ||
kind: analyze | ||
options: | ||
command_args: | ||
- -purl | ||
- pkg:maven/io.avaje/[email protected] | ||
- name: Check that correct repository was cloned | ||
kind: shell | ||
options: | ||
cmd: ls output/git_repos/github_com/avaje/avaje-prisms/ |