我一直关注上述指南,但我一直收到此错误:
2017/07/12 09:53:58 util.go:131: Step './cluster/kubectl.sh version --match-server-version=false' finished in 20.604745ms
2017/07/12 09:53:58 util.go:129: Running: ./hack/e2e-internal/e2e-status.sh
WARNING: The bash deployment for AWS is obsolete. The
v1.5.x releases are the last to support cluster/kube-up.sh with AWS.
For a list of viable alternatives, (...)
2017/07/12 09:53:58 util.go:131: Step './hack/e2e-internal/e2e-status.sh' finished in 18.71843ms
2017/07/12 09:53:58 main.go:216: Something went wrong: encountered 2 errors: [error during ./cluster/kubectl.sh version --match-server-version=false: exit status 1 error during ./hack/e2e-internal/e2e-status.sh: exit status 1]
2017/07/12 09:53:58 e2e.go:78: err: exit status 1
我该如何解决这个问题,我做错了什么?
答案 0 :(得分:2)
如果您只想在不设置整个集群的情况下执行e2e测试,可以从kubernetes存储库编译它们:make all WHAT=test/e2e/e2e.test
,然后针对您的集群运行此编译的e2e二进制文件:./e2e.test --host="<your apiserver>" --provider=local --kubeconfig=<kubeconfig location> -ginkgo.Focus="/[Conformance/]"
。一致性测试应该通过任何kubernetes集群,但当然你可以设置你想要的任何过滤器。要列出所有可用的测试,请键入:./e2e.test --ginkgo.DryRun
。
答案 1 :(得分:0)
您还可以编译ginkgo
:
make WHAT=vendor/github.com/onsi/ginkgo/ginkgo
有些选项很有用:(ginkgo --help
查看详细信息)
-flakeAttempts
-focus
-nodes
-outputdir
-skip
-v
parellely运行测试:(设置--node=1
进行连续测试)
./_output/bin/ginkgo --nodes=25 --flakeAttempts=2 \
./_output/bin/e2e.test -- --host="http://127.0.0.1:8080" \
--provider="local" --ginkgo.v=true --kubeconfig="~/.kube/config" \
--ginkgo.focus="Conformance" --ginkgo.skip="Serial|Slow" \
--ginkgo.failFast=false
如果您想启动本地群集进行e2e测试,hack/local-up-cluster.sh
非常方便。