Is there a way to run a single test within the e2e tests in Kubernetes?

7/12/2017

I am trying to run a single set of a single set of tests within the e2e Kubernetes tests. I am quite confused as to how the tests are organized, is there a comprehensive list of all the tests?

Thanks!

-- phpnovice
e2e-testing
kubernetes

2 Answers

7/13/2017

If you have e2e.test binary, you can list all available test by setting following flag: ./e2e.test --ginkgo.DryRun. Then if you want a single test, type: ./e2e.test --ginkgo.Focus="<name of your test>", pay attentention that all special characters in the test name must be escaped. For example, if you want run only conformance tests: --ginkgo.Focus="\[Conformnce\]".

-- Adam Otto
Source: StackOverflow

8/6/2018

Just in case, the right way of running particularly focused e2e tests is described officially here: https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-tests.md

it would be something like this:

go run hack/e2e.go -- --test --test_args="--ginkgo.focus=${matching regex}" 
-- fedebongio
Source: StackOverflow