Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2021-10-08 02:29:35 +0300
committerJaime Martinez <jmartinez@gitlab.com>2021-10-08 02:29:35 +0300
commit247bd7ba2fd9139711218c6a42ed03c551f958d9 (patch)
tree5f34b0cf1bf51aed35fe35d5396916e89eef5485 /test
parentc48bb316739e39ba1b225f12147fad45337aa711 (diff)
parentbf039d89071e527e2e5c1bc2e64c7513d87cba1a (diff)
Merge branch 'remove/root' into 'master'
Remove gitlab-pages daemon Closes #114 and #133 See merge request gitlab-org/gitlab-pages!542
Diffstat (limited to 'test')
-rw-r--r--test/acceptance/acceptance_test.go1
-rw-r--r--test/acceptance/helpers_test.go23
2 files changed, 0 insertions, 24 deletions
diff --git a/test/acceptance/acceptance_test.go b/test/acceptance/acceptance_test.go
index b36bd63d..3b41eaee 100644
--- a/test/acceptance/acceptance_test.go
+++ b/test/acceptance/acceptance_test.go
@@ -18,7 +18,6 @@ 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 d9f2f14c..e2e1c1d0 100644
--- a/test/acceptance/helpers_test.go
+++ b/test/acceptance/helpers_test.go
@@ -352,7 +352,6 @@ func getPagesArgs(t *testing.T, listeners []ListenSpec, promPort string, extraAr
args = append(args, "-metrics-address", promPort)
}
- args = append(args, getPagesDaemonArgs(t)...)
args = append(args, extraArgs...)
return
@@ -367,28 +366,6 @@ func contains(slice []string, s string) bool {
return false
}
-func getPagesDaemonArgs(t *testing.T) []string {
- if !(*daemonize) {
- return nil
- }
-
- if os.Geteuid() != 0 {
- t.Log("Privilege-dropping requested but not running as root!")
- t.FailNow()
- return nil
- }
-
- out := []string{}
-
- t.Log("Running pages as a daemon")
-
- // This triggers the drop-privileges-and-chroot code in the pages daemon
- out = append(out, "-daemon-uid", "0")
- out = append(out, "-daemon-gid", "65534")
-
- return out
-}
-
// Does a HTTP(S) GET against the listener specified, setting a fake
// Host: and constructing the URL from the listener and the URL suffix.
func GetPageFromListener(t *testing.T, spec ListenSpec, host, urlsuffix string) (*http.Response, error) {