Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-shell
Commits
e9481821
Commit
e9481821
authored
Sep 24, 2019
by
Nick Thomas
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'build-go-1-13' into 'master'
Build against go1.13 See merge request gitlab-org/gitlab-shell!337
parents
996b2e1d
2e9e9668
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
28 deletions
+59
-28
.gitlab-ci.yml
.gitlab-ci.yml
+4
-0
go/internal/gitlabnet/client_test.go
go/internal/gitlabnet/client_test.go
+8
-8
go/internal/testhelper/testdata/testroot/certs/valid/server.crt
...ernal/testhelper/testdata/testroot/certs/valid/server.crt
+20
-10
go/internal/testhelper/testdata/testroot/certs/valid/server.key
...ernal/testhelper/testdata/testroot/certs/valid/server.key
+27
-10
No files found.
.gitlab-ci.yml
View file @
e9481821
...
...
@@ -91,6 +91,10 @@ go:1.12:
<<
:
*go_definition
image
:
golang:1.12
go:1.13:
<<
:
*go_definition
image
:
golang:1.13
codequality
:
image
:
docker:stable
variables
:
...
...
go/internal/gitlabnet/client_test.go
View file @
e9481821
...
...
@@ -117,11 +117,11 @@ func TestClients(t *testing.T) {
func
testSuccessfulGet
(
t
*
testing
.
T
,
client
*
GitlabClient
)
{
t
.
Run
(
"Successful get"
,
func
(
t
*
testing
.
T
)
{
response
,
err
:=
client
.
Get
(
"/hello"
)
defer
response
.
Body
.
Close
()
require
.
NoError
(
t
,
err
)
require
.
NotNil
(
t
,
response
)
defer
response
.
Body
.
Close
()
responseBody
,
err
:=
ioutil
.
ReadAll
(
response
.
Body
)
assert
.
NoError
(
t
,
err
)
assert
.
Equal
(
t
,
string
(
responseBody
),
"Hello"
)
...
...
@@ -133,11 +133,11 @@ func testSuccessfulPost(t *testing.T, client *GitlabClient) {
data
:=
map
[
string
]
string
{
"key"
:
"value"
}
response
,
err
:=
client
.
Post
(
"/post_endpoint"
,
data
)
defer
response
.
Body
.
Close
()
require
.
NoError
(
t
,
err
)
require
.
NotNil
(
t
,
response
)
defer
response
.
Body
.
Close
()
responseBody
,
err
:=
ioutil
.
ReadAll
(
response
.
Body
)
assert
.
NoError
(
t
,
err
)
assert
.
Equal
(
t
,
"Echo: {
\"
key
\"
:
\"
value
\"
}"
,
string
(
responseBody
))
...
...
@@ -189,11 +189,11 @@ func testBrokenRequest(t *testing.T, client *GitlabClient) {
func
testAuthenticationHeader
(
t
*
testing
.
T
,
client
*
GitlabClient
)
{
t
.
Run
(
"Authentication headers for GET"
,
func
(
t
*
testing
.
T
)
{
response
,
err
:=
client
.
Get
(
"/auth"
)
defer
response
.
Body
.
Close
()
require
.
NoError
(
t
,
err
)
require
.
NotNil
(
t
,
response
)
defer
response
.
Body
.
Close
()
responseBody
,
err
:=
ioutil
.
ReadAll
(
response
.
Body
)
require
.
NoError
(
t
,
err
)
...
...
@@ -204,11 +204,11 @@ func testAuthenticationHeader(t *testing.T, client *GitlabClient) {
t
.
Run
(
"Authentication headers for POST"
,
func
(
t
*
testing
.
T
)
{
response
,
err
:=
client
.
Post
(
"/auth"
,
map
[
string
]
string
{})
defer
response
.
Body
.
Close
()
require
.
NoError
(
t
,
err
)
require
.
NotNil
(
t
,
response
)
defer
response
.
Body
.
Close
()
responseBody
,
err
:=
ioutil
.
ReadAll
(
response
.
Body
)
require
.
NoError
(
t
,
err
)
...
...
go/internal/testhelper/testdata/testroot/certs/valid/server.crt
View file @
e9481821
-----BEGIN CERTIFICATE-----
MIIBsDCCAVq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XHHPazM4SDV6uiu5LNKF0iz/NY76rLtFoqSGUgygTZHVbZ6NRXCNUZ0P
slD95wOCWvS9t9xgNXry66k8+mfZNhE+cFQfrO/pN5WpNuGyWTfKlUQw5NVL3mob
j3tSjI+wzSpbPMvbTQoBiZ/VHkyyc15YdrbePwFB2dJbxE/Xgsyk/TwWSUFnAs6i
1x2t+423NIm9rIDTdW2YYJJXv3MUcdDIxJnY0beGePMIymn9ZIRUJtK/ZXmwMb52
v70+YTcsG67uSm31CR8jNt8qpQIDAQABo3QwcjAJBgNVHRMEAjAAMB0GA1UdDgQW
BBTxZ9SORmIwDs90TW8UXIVhDst4kjALBgNVHQ8EBAMCBaAwHQYDVR0lBBYwFAYI
KwYBBQUHAwIGCCsGAQUFBwMBMBoGA1UdEQQTMBGHBH8AAAGCCWxvY2FsaG9zdDAN
BgkqhkiG9w0BAQsFAAOCAQEAf4Iq94Su9TlkReMS4x2N5xZru9YoKQtrrxqWSRbp
oh5Lwtk9rJPy6q4IEPXzDsRI1YWCZe1Fw7zdiNfmoFRxjs59MBJ9YVrcFeyeAILg
LiAiRcGth2THpikCnLxmniGHUUX1WfjmcDEYMIs6BZ98N64VWwtuZqcJnJPmQs64
lDrgW9oz6/8hPMeW58ok8PjkiG+E+srBaURoKwNe7vfPRVyq45N67/juH+4o6QBd
WP6ACjDM3RnxyWyW0S+sl3i3EAGgtwM6RIDhOG238HOIiA/I/+CCmITsvujz6jMN
bLdoPfnatZ7f5m9DuoOsGlYAZbLfOl2NywgO0jAlnHJGEQ==
-----END CERTIFICATE-----
go/internal/testhelper/testdata/testroot/certs/valid/server.key
View file @
e9481821
-----BEGIN PRIVATE KEY-----
MIIBVwIBADANBgkqhkiG9w0BAQEFAASCAUEwggE9AgEAAkEA5YE+G9Ln40epiGk7
j+JV17WO+GJRw5YeJv6qg+Gkyz1P8enzL76rKiKil/XpgM/1Oa817xisKTdg5QSh
AA81swIDAQABAkEAofMPhsbPB1y8TxwjAadvd+YQW0nV9LRr1oyC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jrqVrOJ8Sj1LRYB
lS5+QbSRu4W6Ani3AQwZA09lS608G8w5rD7YGRVDCFuwJt+Yz5GcsSkso9B8DR4h
vCe2WuDutz7M5ikP1DAc/9x5HIzjQijxM1JJCNU2nR6QoFvV6wpVcpECgYEAwNK9
oTqyb7UjNinAo9PFrFpnbX+DoGokGPsRyUwi9UkyRR0Uf7Kxjoq2C8zsCvnGdrE7
kwUiWjyfAgMDF8+iWHYO1vD7m6NL31h/AAmo0NEQIBs0LFj0lF0xORzvXdTjhvuG
LxXhm927z4WBOCLTn8FAsBUjVBpmB6ffyZCVWNUCgYA3P4j2fz0/KvAdkSwW9CGy
uFxqwz8XaE/Eo9lVhnnmNTg0TMqfhFOGkUkzRWEJIaZc9a5RJLwwLI1Pqk4GNnul
c/pFu3YZb/LGb780wbB32FX77JL6P4fXdmDGyb6+Fq2giZaMcyXICauu5ZpJ9JDm
Nw4TxqF31ngN8MBr+4n9UQKBgAkxAoEQ/zh79fW6/8fPbHjOxmdd0LRw2s+mCC8E
RhZTKuZIgJWluvkEe7EMT6QmS+OUhzZ25DBQ+3NpGVilOSPmXMa6LgQ5QIChA0zJ
KRbrIE2nflEu3FnGJ3aFfpOGdmIU00yjSmHXrAA0aPh4EIZo++Bo4Yo8x+hNhElj
bvsRAoGADYZTUchbiVndk5QtnbwlDjrF5PmgjoDboBfv9/6FU+DzQRyOpl3kr0hs
OcZGE6xPZJidv1Bcv60L1VzTMj7spvMRTeumn2zEQGjkl6i/fSZzawjmKaKXKNkC
YfoV0RepB4TlNYGICaTcV+aKRIXivcpBGfduZEb39iUKCjh9Afg=
-----END RSA PRIVATE KEY-----
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment