diff options
author | Nick Thomas <nick@gitlab.com> | 2018-04-25 00:42:56 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-04-27 19:13:46 +0300 |
commit | 7667febecf3bb627d3e0912a59fa1d8918519280 (patch) | |
tree | b7037c5429cdb3eb4e7b205a8c4f8c0aaf1e010a /acceptance_test.go | |
parent | 05c03d65f64021f4a3ead9b627b7293e7b63ca07 (diff) |
Restore the old in-place chroot behaviour as a command-line option
Diffstat (limited to 'acceptance_test.go')
-rw-r--r-- | acceptance_test.go | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/acceptance_test.go b/acceptance_test.go index 78413205..e971588a 100644 --- a/acceptance_test.go +++ b/acceptance_test.go @@ -36,7 +36,7 @@ var ( httpsListener = listeners[2] ) -func skipUnlessEnabled(t *testing.T) { +func skipUnlessEnabled(t *testing.T, conditions ...string) { if testing.Short() { t.Log("Acceptance tests disabled") t.SkipNow() @@ -46,6 +46,19 @@ func skipUnlessEnabled(t *testing.T) { t.Errorf("Couldn't find gitlab-pages binary at %s", *pagesBinary) t.FailNow() } + + for _, condition := range conditions { + switch condition { + case "not-inplace-chroot": + if os.Getenv("TEST_DAEMONIZE") == "inplace" { + t.Log("Not supported with -daemon-inplace-chroot") + t.SkipNow() + } + default: + t.Error("Unknown condition:", condition) + t.FailNow() + } + } } func TestUnknownHostReturnsNotFound(t *testing.T) { @@ -341,7 +354,7 @@ func TestObscureMIMEType(t *testing.T) { } func TestArtifactProxyRequest(t *testing.T) { - skipUnlessEnabled(t) + skipUnlessEnabled(t, "not-inplace-chroot") transport := (TestHTTPSClient.Transport).(*http.Transport) defer func(t time.Duration) { |