File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
tests/integration/cases/email_checking_pypi_malware_analyzer Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# Copyright (c) 2024 - 2025, Oracle and/or its affiliates. All rights reserved.
3
3
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
4
- if sqlite3 --json output/macaron.db " SELECT detect_malicious_metadata_check.detail_information
4
+ result= $( sqlite3 --json output/macaron.db " SELECT detect_malicious_metadata_check.detail_information
5
5
FROM detect_malicious_metadata_check JOIN check_facts on detect_malicious_metadata_check.id = check_facts.id
6
6
JOIN check_result on check_facts.check_result_id = check_result.id JOIN component
7
7
ON component.id = check_result.component_id WHERE check_result.check_id = 'mcn_detect_malicious_metadata_1'
8
- AND component.name = 'smooth-operator'" | jq -r " .[0].detail_information | fromjson | .invalid_emails | length > 0" ; then
9
- exit 0
10
- else
8
+ AND component.name = 'smooth-operator'" | jq -r " .[0].detail_information | fromjson | .invalid_emails | length > 0" )
9
+ if [[ " $result " == " false" ]]; then
11
10
echo " ERROR: the invalid_emails report for smooth-operator is empty" >&2
12
11
exit 1
13
12
fi
14
13
15
- if sqlite3 --json output/macaron.db " SELECT detect_malicious_metadata_check.detail_information
14
+ result= $( sqlite3 --json output/macaron.db " SELECT detect_malicious_metadata_check.detail_information
16
15
FROM detect_malicious_metadata_check JOIN check_facts on detect_malicious_metadata_check.id = check_facts.id
17
16
JOIN check_result on check_facts.check_result_id = check_result.id JOIN component
18
17
ON component.id = check_result.component_id WHERE check_result.check_id = 'mcn_detect_malicious_metadata_1'
19
- AND component.name = 'email-validator'" | jq -r " .[0].detail_information | fromjson | .valid_emails | length > 0" ; then
20
- exit 0
21
- else
18
+ AND component.name = 'email-validator'" | jq -r " .[0].detail_information | fromjson | .valid_emails | length > 0" )
19
+ if [[ " $result " == " false" ]]; then
22
20
echo " ERROR: the valid_emails report for email-validator is empty" >&2
23
- exit 1
21
+ exit 2
24
22
fi
23
+ exit 0
You can’t perform that action at this time.
0 commit comments