Allow focused integration tests to be run from the GoLand UI again
This was broken recently by the improvements in #808.
This commit is contained in:
parent
fca183b203
commit
f700246bfa
@ -13,6 +13,8 @@ ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
|
|||||||
|
|
||||||
source /tmp/integration-test-env
|
source /tmp/integration-test-env
|
||||||
|
|
||||||
|
echo -n "PINNIPED_TEST_GOLAND_RUNNER=true;"
|
||||||
|
|
||||||
printenv | grep PINNIPED_TEST_ | sed 's/=.*//g' | grep -v CLUSTER_CAPABILITY_YAML | while read -r var ; do
|
printenv | grep PINNIPED_TEST_ | sed 's/=.*//g' | grep -v CLUSTER_CAPABILITY_YAML | while read -r var ; do
|
||||||
echo -n "${var}="
|
echo -n "${var}="
|
||||||
echo -n "${!var}" | tr -d '\n'
|
echo -n "${!var}" | tr -d '\n'
|
||||||
|
@ -14,7 +14,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
|
if os.Getenv("PINNIPED_TEST_GOLAND_RUNNER") != "true" {
|
||||||
|
// When running integration tests from inside GoLand, do not modify them.
|
||||||
|
// If the test gets nested under TestIntegrationSerial or the other groups,
|
||||||
|
// then you cannot run/debug a focused integration test in GoLand because the
|
||||||
|
// name of the test changes in a way that GoLand does not expect due to
|
||||||
|
// the nesting.
|
||||||
splitIntegrationTestsIntoBuckets(m)
|
splitIntegrationTestsIntoBuckets(m)
|
||||||
|
}
|
||||||
os.Exit(m.Run())
|
os.Exit(m.Run())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user