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
1
Merge Requests
1
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-ce
Commits
8d8a860f
Commit
8d8a860f
authored
Nov 03, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MigrateGcpClustersToNewClustersArchitectures. Improve spec
parent
b6d0c9b2
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
169 additions
and
77 deletions
+169
-77
db/migrate/20171013104327_migrate_gcp_clusters_to_new_clusters_architectures.rb
...327_migrate_gcp_clusters_to_new_clusters_architectures.rb
+5
-1
spec/migrations/migrate_gcp_clusters_to_new_clusters_architectures_spec.rb
...igrate_gcp_clusters_to_new_clusters_architectures_spec.rb
+164
-76
No files found.
db/migrate/20171013104327_migrate_gcp_clusters_to_new_clusters_architectures.rb
View file @
8d8a860f
...
...
@@ -71,7 +71,7 @@ class MigrateGcpClustersToNewClustersArchitectures < ActiveRecord::Migration
def
params_for_cluster_platforms_kubernetes
(
gcp_cluster
)
{
cluster_id:
gcp_cluster
[
'id'
],
api_url:
'https://'
+
gcp_cluster
[
'endpoint'
]
,
api_url:
api_url
(
gcp_cluster
[
'endpoint'
])
,
ca_cert:
gcp_cluster
[
'ca_cert'
],
namespace:
gcp_cluster
[
'project_namespace'
],
username:
gcp_cluster
[
'username'
],
...
...
@@ -83,4 +83,8 @@ class MigrateGcpClustersToNewClustersArchitectures < ActiveRecord::Migration
updated_at:
gcp_cluster
[
'updated_at'
]
}
end
def
api_url
(
endpoint
)
endpoint
?
'https://'
+
endpoint
:
nil
end
end
spec/migrations/migrate_gcp_clusters_to_new_clusters_architectures_spec.rb
View file @
8d8a860f
This diff is collapsed.
Click to expand it.
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