Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
53e8f9d4
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,发现更多精彩内容 >>
未验证
提交
53e8f9d4
编写于
6月 06, 2019
作者:
S
Sharif Elgamal
提交者:
GitHub
6月 06, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4434 from medyagh/4433_filepath
Fixing file path for windows
上级
ed5e3429
c58a3b63
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
35 addition
and
7 deletion
+35
-7
test/integration/addons_test.go
test/integration/addons_test.go
+17
-4
test/integration/mount_test.go
test/integration/mount_test.go
+6
-1
test/integration/persistence_test.go
test/integration/persistence_test.go
+6
-1
test/integration/tunnel_test.go
test/integration/tunnel_test.go
+6
-1
未找到文件。
test/integration/addons_test.go
浏览文件 @
53e8f9d4
...
...
@@ -25,6 +25,7 @@ import (
"net"
"net/http"
"net/url"
"path"
"path/filepath"
"strings"
"testing"
...
...
@@ -131,12 +132,16 @@ func testIngressController(t *testing.T) {
t
.
Fatalf
(
"waiting for default-http-backend to be up: %v"
,
err
)
}
ingressPath
,
_
:=
filepath
.
Abs
(
"testdata/nginx-ing.yaml"
)
curdir
,
err
:=
filepath
.
Abs
(
""
)
if
err
!=
nil
{
t
.
Errorf
(
"Error getting the file path for current directory: %s"
,
curdir
)
}
ingressPath
:=
path
.
Join
(
curdir
,
"testdata"
,
"nginx-ing.yaml"
)
if
_
,
err
:=
kubectlRunner
.
RunCommand
([]
string
{
"create"
,
"-f"
,
ingressPath
});
err
!=
nil
{
t
.
Fatalf
(
"creating nginx ingress resource: %v"
,
err
)
}
podPath
,
_
:=
filepath
.
Abs
(
"testdata/
nginx-pod-svc.yaml"
)
podPath
:=
path
.
Join
(
curdir
,
"testdata"
,
"
nginx-pod-svc.yaml"
)
if
_
,
err
:=
kubectlRunner
.
RunCommand
([]
string
{
"create"
,
"-f"
,
podPath
});
err
!=
nil
{
t
.
Fatalf
(
"creating nginx ingress resource: %v"
,
err
)
}
...
...
@@ -248,7 +253,11 @@ func testGvisorRestart(t *testing.T) {
func
createUntrustedWorkload
(
t
*
testing
.
T
)
{
kubectlRunner
:=
util
.
NewKubectlRunner
(
t
)
untrustedPath
,
_
:=
filepath
.
Abs
(
"testdata/nginx-untrusted.yaml"
)
curdir
,
err
:=
filepath
.
Abs
(
""
)
if
err
!=
nil
{
t
.
Errorf
(
"Error getting the file path for current directory: %s"
,
curdir
)
}
untrustedPath
:=
path
.
Join
(
curdir
,
"testdata"
,
"nginx-untrusted.yaml"
)
t
.
Log
(
"creating pod with untrusted workload annotation"
)
if
_
,
err
:=
kubectlRunner
.
RunCommand
([]
string
{
"replace"
,
"-f"
,
untrustedPath
,
"--force"
});
err
!=
nil
{
t
.
Fatalf
(
"creating untrusted nginx resource: %v"
,
err
)
...
...
@@ -257,7 +266,11 @@ func createUntrustedWorkload(t *testing.T) {
func
deleteUntrustedWorkload
(
t
*
testing
.
T
)
{
kubectlRunner
:=
util
.
NewKubectlRunner
(
t
)
untrustedPath
,
_
:=
filepath
.
Abs
(
"testdata/nginx-untrusted.yaml"
)
curdir
,
err
:=
filepath
.
Abs
(
""
)
if
err
!=
nil
{
t
.
Errorf
(
"Error getting the file path for current directory: %s"
,
curdir
)
}
untrustedPath
:=
path
.
Join
(
curdir
,
"testdata"
,
"nginx-untrusted.yaml"
)
if
_
,
err
:=
kubectlRunner
.
RunCommand
([]
string
{
"delete"
,
"-f"
,
untrustedPath
});
err
!=
nil
{
t
.
Logf
(
"error deleting untrusted nginx resource: %v"
,
err
)
}
...
...
test/integration/mount_test.go
浏览文件 @
53e8f9d4
...
...
@@ -22,6 +22,7 @@ import (
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"runtime"
"strings"
...
...
@@ -61,7 +62,11 @@ func testMounting(t *testing.T) {
kubectlRunner
:=
util
.
NewKubectlRunner
(
t
)
podName
:=
"busybox-mount"
podPath
,
_
:=
filepath
.
Abs
(
"testdata/busybox-mount-test.yaml"
)
curdir
,
err
:=
filepath
.
Abs
(
""
)
if
err
!=
nil
{
t
.
Errorf
(
"Error getting the file path for current directory: %s"
,
curdir
)
}
podPath
:=
path
.
Join
(
curdir
,
"testdata"
,
"busybox-mount-test.yaml"
)
// Write file in mounted dir from host
expected
:=
"test
\n
"
...
...
test/integration/persistence_test.go
浏览文件 @
53e8f9d4
...
...
@@ -19,6 +19,7 @@ limitations under the License.
package
integration
import
(
"path"
"path/filepath"
"strings"
"testing"
...
...
@@ -36,7 +37,11 @@ func TestPersistence(t *testing.T) {
minikubeRunner
.
EnsureRunning
()
kubectlRunner
:=
util
.
NewKubectlRunner
(
t
)
podPath
,
_
:=
filepath
.
Abs
(
"testdata/busybox.yaml"
)
curdir
,
err
:=
filepath
.
Abs
(
""
)
if
err
!=
nil
{
t
.
Errorf
(
"Error getting the file path for current directory: %s"
,
curdir
)
}
podPath
:=
path
.
Join
(
curdir
,
"testdata"
,
"busybox.yaml"
)
// Create a pod and wait for it to be running.
if
_
,
err
:=
kubectlRunner
.
RunCommand
([]
string
{
"create"
,
"-f"
,
podPath
});
err
!=
nil
{
...
...
test/integration/tunnel_test.go
浏览文件 @
53e8f9d4
...
...
@@ -21,6 +21,7 @@ import (
"io/ioutil"
"net/http"
"os/exec"
"path"
"path/filepath"
"runtime"
"strings"
...
...
@@ -62,7 +63,11 @@ func testTunnel(t *testing.T) {
kubectlRunner
:=
util
.
NewKubectlRunner
(
t
)
t
.
Log
(
"deploying nginx..."
)
podPath
,
_
:=
filepath
.
Abs
(
"testdata/testsvc.yaml"
)
curdir
,
err
:=
filepath
.
Abs
(
""
)
if
err
!=
nil
{
t
.
Errorf
(
"Error getting the file path for current directory: %s"
,
curdir
)
}
podPath
:=
path
.
Join
(
curdir
,
"testdata"
,
"testsvc.yaml"
)
if
_
,
err
:=
kubectlRunner
.
RunCommand
([]
string
{
"apply"
,
"-f"
,
podPath
});
err
!=
nil
{
t
.
Fatalf
(
"creating nginx ingress resource: %s"
,
err
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录