diff options
author | Krasimir Angelov <kangelov@gitlab.com> | 2019-12-05 11:44:17 +0300 |
---|---|---|
committer | Krasimir Angelov <kangelov@gitlab.com> | 2019-12-05 11:44:17 +0300 |
commit | e97fad680a73720b4b539f54f0ac9bcd46ee92f9 (patch) | |
tree | 201489a46f33ee4ca4236dcd605e5bcba3341d4e /helpers_test.go | |
parent | 7f35a7b7c1dde36f695fd7f1627fa77d9d8d2be0 (diff) |
Base64 decode GitLab API secret
before using it.
Diffstat (limited to 'helpers_test.go')
-rw-r--r-- | helpers_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/helpers_test.go b/helpers_test.go index b13fb18f..c04993e9 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 { |