Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
9b04d2af
M
minikube
项目概览
Chu Peng 楚鹏
/
minikube
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
minikube
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9b04d2af
编写于
4月 01, 2020
作者:
M
Medya Gh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change all q to s for rr.Output
上级
c74604e8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
9 deletion
+9
-9
test/integration/functional_test.go
test/integration/functional_test.go
+8
-8
test/integration/start_stop_delete_test.go
test/integration/start_stop_delete_test.go
+1
-1
未找到文件。
test/integration/functional_test.go
浏览文件 @
9b04d2af
...
...
@@ -158,7 +158,7 @@ func validateDockerEnv(ctx context.Context, t *testing.T, profile string) {
t
.
Fatalf
(
"failed to do minikube status after eval-ing docker-env %s"
,
err
)
}
if
!
strings
.
Contains
(
rr
.
Output
(),
"Running"
)
{
t
.
Fatalf
(
"expected status output to include 'Running' after eval docker-env but got: *%
q
*"
,
rr
.
Output
())
t
.
Fatalf
(
"expected status output to include 'Running' after eval docker-env but got: *%
s
*"
,
rr
.
Output
())
}
mctx
,
cancel
=
context
.
WithTimeout
(
ctx
,
Seconds
(
13
))
...
...
@@ -172,7 +172,7 @@ func validateDockerEnv(ctx context.Context, t *testing.T, profile string) {
expectedImgInside
:=
"gcr.io/k8s-minikube/storage-provisioner"
if
!
strings
.
Contains
(
rr
.
Output
(),
expectedImgInside
)
{
t
.
Fatalf
(
"expected 'docker images' to have %q inside minikube. but the output is: *%
q
*"
,
expectedImgInside
,
rr
.
Output
())
t
.
Fatalf
(
"expected 'docker images' to have %q inside minikube. but the output is: *%
s
*"
,
expectedImgInside
,
rr
.
Output
())
}
}
...
...
@@ -281,7 +281,7 @@ func validateStatusCmd(ctx context.Context, t *testing.T, profile string) {
re
:=
`host:([A-z]+),kublet:([A-z]+),apiserver:([A-z]+),kubeconfig:([A-z]+)`
match
,
_
:=
regexp
.
MatchString
(
re
,
rr
.
Stdout
.
String
())
if
!
match
{
t
.
Errorf
(
"failed to match regex %q for minikube status with custom format. args %q. output
%q
"
,
re
,
rr
.
Command
(),
rr
.
Output
())
t
.
Errorf
(
"failed to match regex %q for minikube status with custom format. args %q. output
: %s
"
,
re
,
rr
.
Command
(),
rr
.
Output
())
}
// Json output
...
...
@@ -427,10 +427,10 @@ func validateCacheCmd(ctx context.Context, t *testing.T, profile string) {
t
.
Errorf
(
"failed to do cache list. args %q: %v"
,
rr
.
Command
(),
err
)
}
if
!
strings
.
Contains
(
rr
.
Output
(),
"k8s.gcr.io/pause"
)
{
t
.
Errorf
(
"expected 'cache list' output to include 'k8s.gcr.io/pause' but got:
\n
***%
q
***"
,
rr
.
Output
())
t
.
Errorf
(
"expected 'cache list' output to include 'k8s.gcr.io/pause' but got:
\n
***%
s
***"
,
rr
.
Output
())
}
if
strings
.
Contains
(
rr
.
Output
(),
"busybox:1.28.4-glibc"
)
{
t
.
Errorf
(
"expected 'cache list' output not to include busybox:1.28.4-glibc but got:
\n
***%
q
***"
,
rr
.
Output
())
t
.
Errorf
(
"expected 'cache list' output not to include busybox:1.28.4-glibc but got:
\n
***%
s
***"
,
rr
.
Output
())
}
})
...
...
@@ -440,7 +440,7 @@ func validateCacheCmd(ctx context.Context, t *testing.T, profile string) {
t
.
Errorf
(
"failed to get images by %q ssh %v"
,
rr
.
Command
(),
err
)
}
if
!
strings
.
Contains
(
rr
.
Output
(),
"1.28.4-glibc"
)
{
t
.
Errorf
(
"expected '1.28.4-glibc' to be in the output but got
%q
"
,
rr
.
Output
())
t
.
Errorf
(
"expected '1.28.4-glibc' to be in the output but got
*%s*
"
,
rr
.
Output
())
}
})
...
...
@@ -513,7 +513,7 @@ func validateLogsCmd(ctx context.Context, t *testing.T, profile string) {
}
for
_
,
word
:=
range
[]
string
{
"Docker"
,
"apiserver"
,
"Linux"
,
"kubelet"
}
{
if
!
strings
.
Contains
(
rr
.
Stdout
.
String
(),
word
)
{
t
.
Errorf
(
"excpeted minikube logs to include word: -%q- but got
\n
***%
q
***
\n
"
,
word
,
rr
.
Output
())
t
.
Errorf
(
"excpeted minikube logs to include word: -%q- but got
\n
***%
s
***
\n
"
,
word
,
rr
.
Output
())
}
}
}
...
...
@@ -678,7 +678,7 @@ func validateAddonsCmd(ctx context.Context, t *testing.T, profile string) {
}
for
_
,
a
:=
range
[]
string
{
"dashboard"
,
"ingress"
,
"ingress-dns"
}
{
if
!
strings
.
Contains
(
rr
.
Output
(),
a
)
{
t
.
Errorf
(
"expected 'addon list' output to include -%q- but got *%
q
*"
,
a
,
rr
.
Output
())
t
.
Errorf
(
"expected 'addon list' output to include -%q- but got *%
s
*"
,
a
,
rr
.
Output
())
}
}
...
...
test/integration/start_stop_delete_test.go
浏览文件 @
9b04d2af
...
...
@@ -260,7 +260,7 @@ func testPulledImages(ctx context.Context, t *testing.T, profile string, version
}{}
err
=
json
.
Unmarshal
(
rr
.
Stdout
.
Bytes
(),
&
jv
)
if
err
!=
nil
{
t
.
Errorf
(
"failed to decode images json %v. output: %
q
"
,
err
,
rr
.
Output
())
t
.
Errorf
(
"failed to decode images json %v. output: %
s
"
,
err
,
rr
.
Output
())
}
found
:=
map
[
string
]
bool
{}
for
_
,
img
:=
range
jv
[
"images"
]
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录