Skip to content

Commit

Permalink
chore: add comparison test case for source finder vs analyzer
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Selwyn-Smith <[email protected]>
  • Loading branch information
benmss committed Dec 19, 2024
1 parent b2a997f commit 608cfe1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
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" ]]
36 changes: 36 additions & 0 deletions tests/integration/cases/latest_repo_comparison/test.yaml
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/

0 comments on commit 608cfe1

Please sign in to comment.