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
diff options
context:
space:
mode:
Diffstat (limited to 'test/acceptance/helpers_test.go')
-rw-r--r--test/acceptance/helpers_test.go42
1 files changed, 1 insertions, 41 deletions
diff --git a/test/acceptance/helpers_test.go b/test/acceptance/helpers_test.go
index 4abbe33d..caa4ec3b 100644
--- a/test/acceptance/helpers_test.go
+++ b/test/acceptance/helpers_test.go
@@ -369,34 +369,7 @@ func contains(slice []string, s string) bool {
// 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) {
- return GetPageFromListenerWithCookie(t, spec, host, urlsuffix, "")
-}
-
-func GetPageFromListenerWithCookie(t *testing.T, spec ListenSpec, host, urlsuffix string, cookie string) (*http.Response, error) {
- url := spec.URL(urlsuffix)
- req, err := http.NewRequest("GET", url, nil)
- if err != nil {
- return nil, err
- }
- if cookie != "" {
- req.Header.Set("Cookie", cookie)
- }
-
- req.Host = host
-
- return DoPagesRequest(t, spec, req)
-}
-
-func GetCompressedPageFromListener(t *testing.T, spec ListenSpec, host, urlsuffix string, encoding string) (*http.Response, error) {
- url := spec.URL(urlsuffix)
- req, err := http.NewRequest("GET", url, nil)
- if err != nil {
- return nil, err
- }
- req.Host = host
- req.Header.Set("Accept-Encoding", encoding)
-
- return DoPagesRequest(t, spec, req)
+ return GetPageFromListenerWithHeaders(t, spec, host, urlsuffix, http.Header{})
}
func GetPageFromListenerWithHeaders(t *testing.T, spec ListenSpec, host, urlSuffix string, header http.Header) (*http.Response, error) {
@@ -414,19 +387,6 @@ func GetPageFromListenerWithHeaders(t *testing.T, spec ListenSpec, host, urlSuff
return DoPagesRequest(t, spec, req)
}
-func GetProxiedPageFromListener(t *testing.T, spec ListenSpec, host, xForwardedHost, urlsuffix string) (*http.Response, error) {
- url := spec.URL(urlsuffix)
- req, err := http.NewRequest("GET", url, nil)
- if err != nil {
- return nil, err
- }
-
- req.Host = host
- req.Header.Set("X-Forwarded-Host", xForwardedHost)
-
- return DoPagesRequest(t, spec, req)
-}
-
func DoPagesRequest(t *testing.T, spec ListenSpec, req *http.Request) (*http.Response, error) {
t.Logf("curl -X %s -H'Host: %s' %s", req.Method, req.Host, req.URL)