File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 28
28
exit 1
29
29
fi
30
30
31
+ # test to see if list flag work
32
+ commandoutput=" $( operator-sdk scorecard --version v1alpha2 --list --selector=necessity=required --config " $CONFIG_PATH_V1ALPHA2 " 2>&1 ) "
33
+ labelCount=` echo $commandoutput | grep -o " Label" | wc -l`
34
+ expectedLabelCount=8
35
+ if [ $labelCount -ne $expectedLabelCount ]
36
+ then
37
+ echo " expected label count $expectedLabelCount , got $labelCount "
38
+ exit 1
39
+ fi
40
+
41
+ # test to see if selector flags work
42
+ commandoutput=" $( operator-sdk scorecard --version v1alpha2 --selector=necessity=required --config " $CONFIG_PATH_V1ALPHA2 " 2>&1 ) "
43
+ labelCount=` echo $commandoutput | grep -o " Label" | wc -l`
44
+ expectedLabelCount=8
45
+ if [ $labelCount -ne $expectedLabelCount ]
46
+ then
47
+ echo " expected label count $expectedLabelCount , got $labelCount "
48
+ exit 1
49
+ fi
50
+
31
51
# test to see if version in config file allows v1alpha1 to be specified
32
52
commandoutput=" $( operator-sdk scorecard --config " $CONFIG_PATH_V1ALPHA1 " 2>&1 ) "
33
53
echo $commandoutput | grep " Total Score: 67%"
You can’t perform that action at this time.
0 commit comments