Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hdacloud
dex
Commits
7968f283
Commit
7968f283
authored
8 years ago
by
Eric Chiang
Browse files
Options
Downloads
Patches
Plain Diff
storage/kubernetes: fix kubernetes storage conformance test failures
parent
af0d9ceb
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
storage/kubernetes/client.go
+3
-0
3 additions, 0 deletions
storage/kubernetes/client.go
storage/kubernetes/storage.go
+1
-1
1 addition, 1 deletion
storage/kubernetes/storage.go
storage/kubernetes/types.go
+6
-1
6 additions, 1 deletion
storage/kubernetes/types.go
with
10 additions
and
2 deletions
storage/kubernetes/client.go
+
3
−
0
View file @
7968f283
...
@@ -135,6 +135,9 @@ func checkHTTPErr(r *http.Response, validStatusCodes ...int) error {
...
@@ -135,6 +135,9 @@ func checkHTTPErr(r *http.Response, validStatusCodes ...int) error {
if
r
.
StatusCode
==
http
.
StatusNotFound
{
if
r
.
StatusCode
==
http
.
StatusNotFound
{
return
storage
.
ErrNotFound
return
storage
.
ErrNotFound
}
}
if
r
.
Request
.
Method
==
"POST"
&&
r
.
StatusCode
==
http
.
StatusConflict
{
return
storage
.
ErrAlreadyExists
}
var
url
,
method
string
var
url
,
method
string
if
r
.
Request
!=
nil
{
if
r
.
Request
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
storage/kubernetes/storage.go
+
1
−
1
View file @
7968f283
...
@@ -31,7 +31,7 @@ const (
...
@@ -31,7 +31,7 @@ const (
resourceRefreshToken
=
"refreshtokens"
resourceRefreshToken
=
"refreshtokens"
resourceKeys
=
"signingkeies"
// Kubernetes attempts to pluralize.
resourceKeys
=
"signingkeies"
// Kubernetes attempts to pluralize.
resourcePassword
=
"passwords"
resourcePassword
=
"passwords"
resourceOfflineSessions
=
"offlinesessions
"
resourceOfflineSessions
=
"offlinesessions
es"
// Again attempts to pluralize.
)
)
// Config values for the Kubernetes storage type.
// Config values for the Kubernetes storage type.
...
...
This diff is collapsed.
Click to expand it.
storage/kubernetes/types.go
+
6
−
1
View file @
7968f283
...
@@ -502,9 +502,14 @@ func (cli *client) fromStorageOfflineSessions(o storage.OfflineSessions) Offline
...
@@ -502,9 +502,14 @@ func (cli *client) fromStorageOfflineSessions(o storage.OfflineSessions) Offline
}
}
func
toStorageOfflineSessions
(
o
OfflineSessions
)
storage
.
OfflineSessions
{
func
toStorageOfflineSessions
(
o
OfflineSessions
)
storage
.
OfflineSessions
{
return
storage
.
OfflineSessions
{
s
:=
storage
.
OfflineSessions
{
UserID
:
o
.
UserID
,
UserID
:
o
.
UserID
,
ConnID
:
o
.
ConnID
,
ConnID
:
o
.
ConnID
,
Refresh
:
o
.
Refresh
,
Refresh
:
o
.
Refresh
,
}
}
if
s
.
Refresh
==
nil
{
// Server code assumes this will be non-nil.
s
.
Refresh
=
make
(
map
[
string
]
*
storage
.
RefreshTokenRef
)
}
return
s
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment