From 6b7b256de67436735b948e63663a875d7043a8dd Mon Sep 17 00:00:00 2001 From: feistel <6742251-feistel@users.noreply.gitlab.com> Date: Thu, 26 Aug 2021 04:44:11 +0000 Subject: refactor: remove chroot/jail logic Changelog: removed --- test/acceptance/acceptance_test.go | 1 + test/acceptance/helpers_test.go | 14 +------------- 2 files changed, 2 insertions(+), 13 deletions(-) (limited to 'test') diff --git a/test/acceptance/acceptance_test.go b/test/acceptance/acceptance_test.go index e6b50c10..9d0c0cd2 100644 --- a/test/acceptance/acceptance_test.go +++ b/test/acceptance/acceptance_test.go @@ -16,6 +16,7 @@ const ( var ( pagesBinary = flag.String("gitlab-pages-binary", "../../gitlab-pages", "Path to the gitlab-pages binary") + daemonize = flag.Bool("daemonize", false, "run tests as daemon") httpPort = "36000" httpsPort = "37000" diff --git a/test/acceptance/helpers_test.go b/test/acceptance/helpers_test.go index c8852976..b8181dca 100644 --- a/test/acceptance/helpers_test.go +++ b/test/acceptance/helpers_test.go @@ -367,8 +367,7 @@ func contains(slice []string, s string) bool { } func getPagesDaemonArgs(t *testing.T) []string { - mode := os.Getenv("TEST_DAEMONIZE") - if mode == "" { + if !(*daemonize) { return nil } @@ -380,17 +379,6 @@ func getPagesDaemonArgs(t *testing.T) []string { out := []string{} - switch mode { - case "tmpdir": - out = append(out, "-daemon-inplace-chroot=false") - case "inplace": - out = append(out, "-daemon-inplace-chroot=true") - default: - t.Log("Unknown daemonize mode", mode) - t.FailNow() - return nil - } - t.Log("Running pages as a daemon") // This triggers the drop-privileges-and-chroot code in the pages daemon -- cgit v1.2.3