File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 42
42
fi
43
43
done
44
44
45
+ errors_expect_equal=()
46
+ for file in " ${all_e2e_files[@]} "
47
+ do
48
+ if grep -E " Expect\(.*\)\.To\((gomega\.Equal|Equal)" " ${file} " > /dev/null
49
+ then
50
+ errors_expect_equal+=( " ${file} " )
51
+ fi
52
+ done
53
+
45
54
if [ ${# errors_expect_no_error[@]} -ne 0 ]; then
46
55
{
47
56
echo " Errors:"
@@ -70,4 +79,18 @@ if [ ${#errors_expect_error[@]} -ne 0 ]; then
70
79
exit 1
71
80
fi
72
81
82
+ if [ ${# errors_expect_equal[@]} -ne 0 ]; then
83
+ {
84
+ echo " Errors:"
85
+ for err in " ${errors_expect_equal[@]} " ; do
86
+ echo " $err "
87
+ done
88
+ echo
89
+ echo ' The above files need to use framework.ExpectEqual(foo, bar) instead of '
90
+ echo ' Expect(foo).To(Equal(bar)) or gomega.Expect(foo).To(gomega.Equal(bar))'
91
+ echo
92
+ } >&2
93
+ exit 1
94
+ fi
95
+
73
96
echo ' Congratulations! All e2e test source files are valid.'
You can’t perform that action at this time.
0 commit comments