Commit 8d8a860f authored by Shinya Maeda's avatar Shinya Maeda

Fix MigrateGcpClustersToNewClustersArchitectures. Improve spec

parent b6d0c9b2
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment