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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-12-10 19:43:20 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-12-10 19:43:20 +0300
commit22a73c6be625c1cdbe676ac3e1bef9985fb47fd9 (patch)
tree02282b0b1277ad6c273093d8133c032cef41478c /helpers_test.go
parent185d5e494eb32b14f5f9340d8bd5cb8b95657f3f (diff)
parent266b942aba1f98c0548472542cfc6b7cec7a5f17 (diff)
Merge branch 'master' into feature/gb/gitlab-domains-source
* master: Add support for the port component in the Host header Base64 decode GitLab API secret
Diffstat (limited to 'helpers_test.go')
-rw-r--r--helpers_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/helpers_test.go b/helpers_test.go
index 26f432c6..bcc43d63 100644
--- a/helpers_test.go
+++ b/helpers_test.go
@@ -75,6 +75,16 @@ func CreateHTTPSFixtureFiles(t *testing.T) (key string, cert string) {
return keyfile.Name(), certfile.Name()
}
+func CreateGitLabAPISecretKeyFixtureFile(t *testing.T) (filepath string) {
+ secretfile, err := ioutil.TempFile("", "gitlab-api-secret")
+ require.NoError(t, err)
+ secretfile.Close()
+
+ require.NoError(t, ioutil.WriteFile(secretfile.Name(), []byte(fixture.GitLabAPISecretKey), 0644))
+
+ return secretfile.Name()
+}
+
// ListenSpec is used to point at a gitlab-pages http server, preserving the
// type of port it is (http, https, proxy)
type ListenSpec struct {