Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
ffaa27b2
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,发现更多精彩内容 >>
未验证
提交
ffaa27b2
编写于
3月 21, 2019
作者:
S
Sharif Elgamal
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adding test to make sure HEAD can run on VM created by latest release
上级
b08af194
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
95 addition
and
7 deletion
+95
-7
test.sh
test.sh
+7
-7
test/integration/version_upgrade_test.go
test/integration/version_upgrade_test.go
+88
-0
未找到文件。
test.sh
浏览文件 @
ffaa27b2
...
...
@@ -20,9 +20,9 @@ REPO_PATH="k8s.io/minikube"
# Check for python on host, and use it if possible, otherwise fall back on python dockerized
if
[[
-f
$(
which python 2>&1
)
]]
;
then
PYTHON
=
"python"
PYTHON
=
"python"
else
PYTHON
=
"docker run --rm -it -v
$(
pwd
)
:/minikube -w /minikube python python"
PYTHON
=
"docker run --rm -it -v
$(
pwd
)
:/minikube -w /minikube python python"
fi
...
...
@@ -51,9 +51,9 @@ set +e
files
=
$(
gofmt
-l
-s
.
|
grep
-v
${
ignore
}
)
set
-e
if
[[
$files
]]
;
then
gofmt
-d
${
files
}
echo
"Gofmt errors in files:
$files
"
exit
1
gofmt
-d
${
files
}
echo
"Gofmt errors in files:
$files
"
exit
1
fi
# Check boilerplate
...
...
@@ -64,8 +64,8 @@ set +e
files
=
$(
${
PYTHON
}
${
BOILERPLATEDIR
}
/boilerplate.py
--rootdir
.
--boilerplate-dir
${
BOILERPLATEDIR
}
|
grep
-v
$ignore
)
set
-e
if
[[
!
-z
${
files
}
]]
;
then
echo
"Boilerplate missing in:
${
files
}
."
exit
1
echo
"Boilerplate missing in:
${
files
}
."
exit
1
fi
echo
"Checking releases.json schema"
...
...
test/integration/version_upgrade_test.go
0 → 100644
浏览文件 @
ffaa27b2
/*
Copyright 2019 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
integration
import
(
"io"
"io/ioutil"
"net/http"
"os"
"os/exec"
"runtime"
"testing"
"github.com/docker/machine/libmachine/state"
"github.com/pkg/errors"
"k8s.io/minikube/test/integration/util"
)
func
TestVersionUpgrade
(
t
*
testing
.
T
)
{
currentRunner
:=
NewMinikubeRunner
(
t
)
currentRunner
.
RunCommand
(
"delete"
,
true
)
currentRunner
.
CheckStatus
(
state
.
None
.
String
())
isoName
:=
"minikube-linux-amd64"
if
runtime
.
GOOS
==
"darwin"
{
isoName
=
"minikube-darwin-amd64"
}
else
if
runtime
.
GOOS
==
"windows"
{
isoName
=
"minikube-windows-amd64.exe"
}
// Grab latest release binary
url
:=
"https://storage.googleapis.com/minikube/releases/latest/"
+
isoName
resp
,
err
:=
http
.
Get
(
url
)
if
err
!=
nil
{
t
.
Fatal
(
errors
.
Wrap
(
err
,
"Failed to get latest release binary"
))
}
defer
resp
.
Body
.
Close
()
iso
,
err
:=
ioutil
.
TempFile
(
""
,
isoName
)
if
err
!=
nil
{
t
.
Fatal
(
errors
.
Wrap
(
err
,
"Failed to create binary file"
))
}
defer
os
.
Remove
(
iso
.
Name
())
_
,
err
=
io
.
Copy
(
iso
,
resp
.
Body
)
if
err
!=
nil
{
t
.
Fatal
(
errors
.
Wrap
(
err
,
"Failed to populate iso file"
))
}
if
err
:=
iso
.
Close
();
err
!=
nil
{
t
.
Fatal
(
errors
.
Wrap
(
err
,
"Failed to close iso"
))
}
if
runtime
.
GOOS
!=
"windows"
{
if
err
:=
exec
.
Command
(
"chmod"
,
"+x"
,
iso
.
Name
())
.
Run
();
err
!=
nil
{
t
.
Fatal
(
errors
.
Wrap
(
err
,
"Failed to make binary executable."
))
}
}
latestRunner
:=
util
.
MinikubeRunner
{
Args
:
currentRunner
.
Args
,
BinaryPath
:
iso
.
Name
(),
StartArgs
:
currentRunner
.
StartArgs
,
MountArgs
:
currentRunner
.
MountArgs
,
T
:
t
,
}
latestRunner
.
Start
()
latestRunner
.
CheckStatus
(
state
.
Running
.
String
())
latestRunner
.
RunCommand
(
"stop"
,
true
)
latestRunner
.
CheckStatus
(
state
.
Stopped
.
String
())
currentRunner
.
Start
()
currentRunner
.
CheckStatus
(
state
.
Running
.
String
())
currentRunner
.
RunCommand
(
"delete"
,
true
)
currentRunner
.
CheckStatus
(
state
.
None
.
String
())
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录