Skip to content

Commit 1d0852e

Browse files
committed
chore: convert case invalid_branch_or_commit_yaml_input
Signed-off-by: Nathan Nguyen <[email protected]>
1 parent f565da5 commit 1d0852e

File tree

4 files changed

+23
-21
lines changed

4 files changed

+23
-21
lines changed

scripts/dev_scripts/integration_tests.sh

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -134,25 +134,6 @@ run_macaron_clean $ANALYZE -c $WORKSPACE/tests/dependency_analyzer/configuration
134134

135135
check_or_update_expected_output $COMPARE_DEPS $DEP_RESULT $DEP_EXPECTED || log_fail
136136

137-
echo -e "\n----------------------------------------------------------------------------------"
138-
echo "apache/maven: Check: Check the e2e status code of running with invalid branch or digest defined in the yaml configuration."
139-
echo -e "----------------------------------------------------------------------------------\n"
140-
declare -a INVALID_BRANCH_DIGEST=(
141-
"maven_invalid_branch.yaml"
142-
"maven_invalid_digest.yaml"
143-
)
144-
145-
for i in "${INVALID_BRANCH_DIGEST[@]}"
146-
do
147-
echo -e "Running with $WORKSPACE/tests/e2e/configurations/$i"
148-
run_macaron_clean $ANALYZE -c $WORKSPACE/tests/e2e/configurations/$i
149-
if [ $? -eq 0 ];
150-
then
151-
echo -e "Expect non-zero status code for $WORKSPACE/test/e2e/configurations/$i but got $?."
152-
log_fail
153-
fi
154-
done
155-
156137
echo -e "\n----------------------------------------------------------------------------------"
157138
echo "Test using the default template file."
158139
echo -e "----------------------------------------------------------------------------------\n"

tests/e2e/configurations/maven_invalid_branch.yaml renamed to tests/integration/cases/invalid_branch_or_commit_yaml_input/maven_invalid_branch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022 - 2022, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2022 - 2024, Oracle and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
33

44
target:

tests/e2e/configurations/maven_invalid_digest.yaml renamed to tests/integration/cases/invalid_branch_or_commit_yaml_input/maven_invalid_commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022 - 2022, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2022 - 2024, Oracle and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
33

44
target:
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) 2024 - 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
3+
4+
description: |
5+
Check the e2e status code of running with invalid branch or commit defined in the yaml configuration.
6+
7+
steps:
8+
- name: Run macaron analyze with yaml input containing invalid branch
9+
kind: analyze
10+
options:
11+
command_args:
12+
- -c
13+
- maven_invalid_branch.yaml
14+
expect_fail: true
15+
- name: Run macaron analyze with yaml input containing invalid commit
16+
kind: analyze
17+
options:
18+
command_args:
19+
- -c
20+
- maven_invalid_commit.yaml
21+
expect_fail: true

0 commit comments

Comments
 (0)