Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
Léo-Paul Géneau
gitlab-ce
Commits
d13be3c2
Commit
d13be3c2
authored
Jan 06, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store OAuth token in Redis for worker to pick up
parent
a180306d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
app/controllers/projects/clusters/gcp_controller.rb
app/controllers/projects/clusters/gcp_controller.rb
+6
-1
spec/features/projects/clusters/gcp_spec.rb
spec/features/projects/clusters/gcp_spec.rb
+1
-1
No files found.
app/controllers/projects/clusters/gcp_controller.rb
View file @
d13be3c2
...
...
@@ -65,7 +65,12 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
end
def
authorize_google_project_billing
CheckGcpProjectBillingWorker
.
perform_async
(
token_in_session
)
redis_token_key
=
CheckGcpProjectBillingWorker
.
generate_redis_token_key
Gitlab
::
Redis
::
SharedState
.
with
do
|
redis
|
redis
.
set
(
redis_token_key
,
token_in_session
,
ex:
5
.
minutes
)
end
CheckGcpProjectBillingWorker
.
perform_async
(
redis_token_key
)
end
def
google_project_billing_status
...
...
spec/features/projects/clusters/gcp_spec.rb
View file @
d13be3c2
...
...
@@ -22,7 +22,7 @@ feature 'Gcp Cluster', :js do
context
'when user has a GCP project with billing enabled'
do
before
do
allow
(
CheckGcpProjectBillingWorker
).
to
receive
(
:perform_async
)
allow
_any_instance_of
(
Projects
::
Clusters
::
GcpController
).
to
receive
(
:authorize_google_project_billing
)
stub_google_project_billing_status
end
...
...
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