@echo " TEST=[name1,name2...] - specific test(s) to run"
@echo " SKIP=[name1,name2...] - specific test(s) to skip"
@echo " REPEAT=[n] - repeat tests up to N times or until a failure occurs"
- @echo " DRYRUN=[true|false] - set up containers but don't run tests"
@echo " NO_COLOR=[true|false] - disables colorful Docker and Ginkgo output"
@echo " TIMEOUT=[minutes] - test timeout override (30 minutes by default)"
@echo " GINKGO_TIMEOUT=[Ns/m/h] - Ginkgo timeout override (3h by default)"
RegisterFailHandler(Fail)
RunSpecs(t, "kube-test")
- if *DryRun || *IsPersistent {
+ if *IsPersistent {
fmt.Println("\033[36m" + "Use 'make cleanup-kube' to remove pods " +
"and namespaces. \nPPID: " + Ppid + "\033[0m")
}
// deleting the namespace here since we use the same namespace for every suite
- if !*DryRun || !*IsPersistent {
+ if !*IsPersistent {
fmt.Println("Deleting kube-test namespace")
cmd := exec.Command("kubectl", "delete", "ns", "kube-test"+Ppid)
fmt.Println(cmd.String())
var IsPersistent = flag.Bool("persist", false, "persists topology config")
var IsVerbose = flag.Bool("verbose", false, "verbose test output")
var IsVppDebug = flag.Bool("debug", false, "attach gdb to vpp")
-var DryRun = flag.Bool("dryrun", false, "set up containers but don't run tests")
var Timeout = flag.Int("timeout", 30, "test timeout override (in minutes)")
var TestTimeout time.Duration
var Kubeconfig string
}
func (s *BaseSuite) TeardownTest() {
- if *IsPersistent || *DryRun {
+ if *IsPersistent {
s.Skip("Skipping test teardown")
}
s.Log("[* TEST TEARDOWN]")
}
func (s *BaseSuite) TeardownSuite() {
- if *IsPersistent || *DryRun {
+ if *IsPersistent {
s.Skip("Skipping suite teardown")
}
s.Log("[* SUITE TEARDOWN]")
args=
focused_test=0
persist_set=0
-dryrun_set=0
debug_set=0
debug_build=
ginkgo_args=
tc_names=()
skip_names=()
-dryrun=
no_color=
for i in "$@"
--repeat=*)
ginkgo_args="$ginkgo_args --repeat=${i#*=}"
;;
- --dryrun=*)
- dryrun="${i#*=}"
- if [ "$dryrun" = "true" ]; then
- args="$args -dryrun"
- dryrun_set=1
- fi
- ;;
--no_color=*)
no_color="${i#*=}"
if [ "$no_color" = "true" ]; then
ginkgo_args="$ginkgo_args --skip $skip"
done
-if [ $focused_test -eq 0 ] && { [ $persist_set -eq 1 ] || [ $dryrun_set -eq 1 ]; }; then
- echo -e "\e[1;31mpersist/dryrun flag is not supported while running all tests!\e[1;0m"
+if [ $focused_test -eq 0 ] && { [ $persist_set -eq 1 ]; }; then
+ echo -e "\e[1;31mpersist flag is not supported while running all tests!\e[1;0m"
exit 2
fi