Commit 40e8332 1 parent 150222d commit 40e8332 Copy full SHA for 40e8332
File tree 3 files changed +23
-4
lines changed
3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,24 @@ source "$SCRIPTDIR/common.sh"
8
8
9
9
pass=true
10
10
11
- fromager lint-requirements " $SCRIPTDIR /validate_inputs/constraints.txt " " $SCRIPTDIR /validate_inputs/requirements.txt "
11
+ # Test to demonstrate that command works as expected when input files are valid
12
12
13
- if [ $? -ne 0 ]; then
14
- echo " the input files are not correctly formatted."
13
+ if ! fromager lint-requirements " $SCRIPTDIR /validate_inputs/constraints.txt" " $SCRIPTDIR /validate_inputs/requirements.txt" ; then
14
+ echo " the input files are not correctly formatted." 1>&2
15
+ pass=false
16
+ fi ;
17
+
18
+ # Test to demonstrate failing of command due to missing input args
19
+
20
+ if fromager lint-requirements " $SCRIPTDIR /validate_inputs/constraints.txt" ; then
21
+ echo " input arguments are missing for the command" 1>&2
22
+ pass=false
23
+ fi ;
24
+
25
+ # Test to demonstrate that command reports error for invalid / bad input files
26
+
27
+ if fromager lint-requirements " $SCRIPTDIR /validate_inputs/constraints.txt" " $SCRIPTDIR /validate_inputs/invalid-requirements.txt" ; then
28
+ echo " input arguments are missing for the command" 1>&2
15
29
pass=false
16
30
fi ;
17
31
Original file line number Diff line number Diff line change
1
+ # This requirements file is invalid on purpose to test the lint-requirements
2
+ # command of fromager. Do not attempt to fix this file
3
+
4
+ foo==
5
+ bar<=
Original file line number Diff line number Diff line change 1
1
# This requirements.txt is used for testing lint_requirements
2
- # command of fromager an contains examples of packages
2
+ # command of fromager and contains examples of packages
3
3
stevedore == 5.2.0
4
4
kfp == 2.11.0
5
5
You can’t perform that action at this time.
0 commit comments