Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
aee599f0
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 搜索 >>
提交
aee599f0
编写于
7月 30, 2019
作者:
M
Medya Gh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add hostname friendly testnames, improve download-only test
上级
ca7bee49
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
12 deletion
+29
-12
test/integration/a_download_only_test.go
test/integration/a_download_only_test.go
+19
-5
test/integration/start_stop_delete_test.go
test/integration/start_stop_delete_test.go
+10
-7
未找到文件。
test/integration/a_download_only_test.go
浏览文件 @
aee599f0
...
...
@@ -20,7 +20,10 @@ limitations under the License.
package
integration
import
(
"fmt"
"testing"
"k8s.io/minikube/pkg/minikube/constants"
)
// TestDownloadOnly downloads ISOs also tests the --download-only option
...
...
@@ -36,10 +39,21 @@ func TestDownloadOnly(t *testing.T) {
defer
mk
.
TearDown
(
t
)
}
stdout
,
stderr
,
err
:=
mk
.
Start
(
"--download-only"
)
if
err
!=
nil
{
t
.
Fatalf
(
"%s minikube start failed : %v
\n
stdout: %s
\n
stderr: %s"
,
p
,
err
,
stdout
,
stderr
)
}
// TODO: add test to check if files are downloaded
t
.
Run
(
"Oldest"
,
func
(
t
*
testing
.
T
)
{
stdout
,
stderr
,
err
:=
mk
.
Start
(
"--download-only"
,
fmt
.
Sprintf
(
"--kubernetes-version=%s"
,
constants
.
OldestKubernetesVersion
))
if
err
!=
nil
{
t
.
Fatalf
(
"%s minikube --download-only failed : %v
\n
stdout: %s
\n
stderr: %s"
,
p
,
err
,
stdout
,
stderr
)
}
})
t
.
Run
(
"Newest"
,
func
(
t
*
testing
.
T
)
{
stdout
,
stderr
,
err
:=
mk
.
Start
(
"--download-only"
,
fmt
.
Sprintf
(
"--kubernetes-version=%s"
,
constants
.
NewestKubernetesVersion
))
if
err
!=
nil
{
t
.
Fatalf
(
"%s minikube --download-only failed : %v
\n
stdout: %s
\n
stderr: %s"
,
p
,
err
,
stdout
,
stderr
)
}
// TODO: add test to check if files are downloaded
})
// TODO: download latest binary to test data here
}
test/integration/start_stop_delete_test.go
浏览文件 @
aee599f0
...
...
@@ -46,7 +46,7 @@ func TestStartStop(t *testing.T) {
name
string
args
[]
string
}{
{
"
nocache_oldest"
,
[]
string
{
{
"
oldest"
,
[]
string
{
// nocache_oldest
"--cache-images=false"
,
fmt
.
Sprintf
(
"--kubernetes-version=%s"
,
constants
.
OldestKubernetesVersion
),
// default is the network created by libvirt, if we change the name minikube won't boot
...
...
@@ -54,7 +54,7 @@ func TestStartStop(t *testing.T) {
"--kvm-network=default"
,
"--kvm-qemu-uri=qemu:///system"
,
}},
{
"
feature_gates_newest_cni"
,
[]
string
{
{
"
cni"
,
[]
string
{
// feature_gates_newest_cni
"--feature-gates"
,
"ServerSideApply=true"
,
"--network-plugin=cni"
,
...
...
@@ -62,25 +62,28 @@ func TestStartStop(t *testing.T) {
"--extra-config=kubeadm.pod-network-cidr=192.168.111.111/16"
,
fmt
.
Sprintf
(
"--kubernetes-version=%s"
,
constants
.
NewestKubernetesVersion
),
}},
{
"containerd
_and_non_default_apiserver_port"
,
[]
string
{
{
"containerd
"
,
[]
string
{
// containerd_and_non_default_apiserver_port
"--container-runtime=containerd"
,
"--docker-opt containerd=/var/run/containerd/containerd.sock"
,
"--apiserver-port=8444"
,
}},
{
"crio
_ignore_preflights"
,
[]
string
{
{
"crio
"
,
[]
string
{
// crio_ignore_preflights
"--container-runtime=crio"
,
"--extra-config"
,
"kubeadm.ignore-preflight-errors=SystemVerification"
,
}},
}
t
.
Run
(
"group"
,
func
(
t
*
testing
.
T
)
{
t
.
Parallel
()
for
_
,
tc
:=
range
tests
{
n
:=
tc
.
name
// because similar to https://golang.org/doc/faq#closures_and_goroutines
t
.
Run
(
tc
.
name
,
func
(
t
*
testing
.
T
)
{
t
.
Parallel
()
mk
:=
NewMinikubeRunner
(
t
,
p
+
tc
.
name
)
p
=
p
+
n
mk
:=
NewMinikubeRunner
(
t
,
p
)
// TODO : redundant first clause, this test never happens for none
if
!
strings
.
Contains
(
tc
.
name
,
"docker"
)
&&
isTestNoneDriver
()
{
t
.
Skipf
(
"skipping %s - incompatible with none driver"
,
t
c
.
name
)
if
!
strings
.
Contains
(
p
,
"docker"
)
&&
isTestNoneDriver
()
{
t
.
Skipf
(
"skipping %s - incompatible with none driver"
,
t
.
Name
()
)
}
mk
.
RunCommand
(
"config set WantReportErrorPrompt false"
,
true
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录