Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
bee5c080
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bee5c080
编写于
10月 04, 2017
作者:
K
Kamil Trzcinski
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix Rubocop failures
上级
54831bd4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
14 deletion
+13
-14
app/controllers/projects/clusters_controller.rb
app/controllers/projects/clusters_controller.rb
+6
-6
spec/javascripts/fixtures/clusters.rb
spec/javascripts/fixtures/clusters.rb
+0
-1
spec/models/gcp/cluster_spec.rb
spec/models/gcp/cluster_spec.rb
+3
-3
spec/services/ci/create_cluster_service_spec.rb
spec/services/ci/create_cluster_service_spec.rb
+2
-2
spec/workers/wait_for_cluster_creation_worker_spec.rb
spec/workers/wait_for_cluster_creation_worker_spec.rb
+2
-2
未找到文件。
app/controllers/projects/clusters_controller.rb
浏览文件 @
bee5c080
...
...
@@ -60,12 +60,12 @@ class Projects::ClustersController < Projects::ApplicationController
.
new
(
project
,
current_user
,
cluster_params
)
.
execute
(
cluster
)
if
cluster
.
valid?
flash
[
:notice
]
=
"Cluster was successfully updated."
redirect_to
project_cluster_path
(
project
,
project
.
cluster
)
else
render
:show
end
if
cluster
.
valid?
flash
[
:notice
]
=
"Cluster was successfully updated."
redirect_to
project_cluster_path
(
project
,
project
.
cluster
)
else
render
:show
end
end
def
destroy
...
...
spec/javascripts/fixtures/clusters.rb
浏览文件 @
bee5c080
...
...
@@ -31,5 +31,4 @@ describe Projects::ClustersController, '(JavaScript fixtures)', type: :controlle
expect
(
response
).
to
be_success
store_frontend_fixture
(
response
,
example
.
description
)
end
end
spec/models/gcp/cluster_spec.rb
浏览文件 @
bee5c080
...
...
@@ -34,7 +34,7 @@ describe Gcp::Cluster do
end
context
'when too long'
do
let
(
:gcp_project_id
)
{
'A'
*
64
}
let
(
:gcp_project_id
)
{
'A'
*
64
}
it
{
is_expected
.
to
be_falsey
}
end
...
...
@@ -62,7 +62,7 @@ describe Gcp::Cluster do
end
context
'when too long'
do
let
(
:gcp_cluster_name
)
{
'A'
*
64
}
let
(
:gcp_cluster_name
)
{
'A'
*
64
}
it
{
is_expected
.
to
be_falsey
}
end
...
...
@@ -106,7 +106,7 @@ describe Gcp::Cluster do
end
context
'when too long'
do
let
(
:project_namespace
)
{
'A'
*
64
}
let
(
:project_namespace
)
{
'A'
*
64
}
it
{
is_expected
.
to
be_falsey
}
end
...
...
spec/services/ci/create_cluster_service_spec.rb
浏览文件 @
bee5c080
...
...
@@ -13,7 +13,7 @@ describe Ci::CreateClusterService do
gcp_project_id:
'gcp-project'
,
gcp_cluster_name:
'test-cluster'
,
gcp_cluster_zone:
'us-central1-a'
,
gcp_cluster_size:
1
,
gcp_cluster_size:
1
}
end
...
...
@@ -34,7 +34,7 @@ describe Ci::CreateClusterService do
gcp_project_id:
'gcp-project'
,
gcp_cluster_name:
'test-cluster'
,
gcp_cluster_zone:
'us-central1-a'
,
gcp_cluster_size:
'ABC'
,
gcp_cluster_size:
'ABC'
}
end
...
...
spec/workers/wait_for_cluster_creation_worker_spec.rb
浏览文件 @
bee5c080
...
...
@@ -8,7 +8,7 @@ describe WaitForClusterCreationWorker do
before
do
allow
(
operation
).
to
receive
(
:status
).
and_return
(
status
)
allow
(
operation
).
to
receive
(
:start_time
).
and_return
(
1
.
minute
s
.
ago
)
allow
(
operation
).
to
receive
(
:start_time
).
and_return
(
1
.
minute
.
ago
)
allow
(
operation
).
to
receive
(
:status_message
).
and_return
(
'error'
)
allow_any_instance_of
(
Ci
::
FetchGcpOperationService
).
to
receive
(
:execute
).
and_yield
(
operation
)
end
...
...
@@ -17,7 +17,7 @@ describe WaitForClusterCreationWorker do
let
(
:status
)
{
'RUNNING'
}
it
'reschedules worker'
do
expect
(
WaitForClusterCreationWorker
).
to
receive
(
:perform_in
)
expect
(
described_class
).
to
receive
(
:perform_in
)
described_class
.
new
.
perform
(
cluster
.
id
)
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录