提交 0e3a3749 编写于 作者: A Aaron Prindle

Fixing windows integration tests

上级 819bb2a1
......@@ -27,7 +27,7 @@
set -e
set +x
for job in "OSX-Virtualbox" "OSX-XHyve" "OSX-Virtualbox-SystemD" "Linux-Virtualbox" "Linux-KVM"; do
for job in "OSX-Virtualbox" "OSX-XHyve" "OSX-Virtualbox-SystemD" "Linux-Virtualbox" "Linux-KVM" "Windows-HyperV"; do
target_url="https://storage.googleapis.com/minikube-builds/logs/${ghprbPullId}/${job}.txt"
curl "https://api.github.com/repos/kubernetes/minikube/statuses/${ghprbActualCommit}?access_token=$access_token" \
-H "Content-Type: application/json" \
......
......@@ -12,37 +12,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# $ErrorActionPreference = "Stop"
mkdir -p out
gsutil.cmd -m cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/* out/
# chmod +x out/e2e-windows-amd64.exe
# chmod +x out/minikube-windows-amd64.exe
cp -r out/testdata ./
./out/minikube-windows-amd64.exe delete # || true
# Allow this to fail, we'll switch on the return code below.
# set +e
out/e2e-windows-amd64.exe --% -minikube-args="--vm-driver=hyperv --cpus=4 $env:EXTRA_BUILD_ARGS" -test.v -test.timeout=30m -binary=out/minikube-windows-amd64.exe
result=$?
# set -e
# If the last exit code was non-zero, return w/ error
If (-Not $?) {exit $?}
$env:result=$lastexitcode
# If the last exit code was 0->success, x>0->error
If($env:result -eq 0){$env:status="success"}
Else {$env:status="failure"}
# if [[ $result -eq 0 ]]; then
# status="success"
# else
# status="failure"
# fi
$env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/Windows-hyperv.txt"
$json = "{`"state`": `"$env:status`", `"description`": `"Jenkins`", `"target_url`": `"$env:target_url`", `"context`": `"Windows-hyperv`"}"
Invoke-WebRequest -Uri "https://api.github.com/repos/kubernetes/minikube/statuses/$env:COMMIT`?access_token=$env:access_token" -Body $json -ContentType "application/json" -Method Post -usebasicparsing
# set +x
# target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/OSX-hyperv.txt"
# curl "https://api.github.com/repos/kubernetes/minikube/statuses/$env:COMMIT?access_token=$access_token" \
# -H "Content-Type: application/json" \
# -X POST \
# -d "{\"state\": \"$status\", \"description\": \"Jenkins\", \"target_url\": \"$target_url\", \"context\": \"OSX-hyperv\"}"
# set -x
# exit $result
\ No newline at end of file
Exit $env:result
......@@ -75,8 +75,7 @@ func TestDashboard(t *testing.T) {
BinaryPath: *binaryPath,
Args: *args,
T: t}
minikubeRunner.Start()
minikubeRunner.CheckStatus("Running")
minikubeRunner.EnsureRunning()
kubectlRunner := util.NewKubectlRunner(t)
checkDashboard := func() error {
......
......@@ -83,7 +83,7 @@ func (m *MinikubeRunner) EnsureRunning() {
}
func (m *MinikubeRunner) SetEnvFromEnvCmdOutput(dockerEnvVars string) error {
re := regexp.MustCompile(`export (.+?)="?(.+?)"?\n`)
re := regexp.MustCompile(`(\w+?) ?= ?"?(.+?)"?\n`)
matches := re.FindAllStringSubmatch(dockerEnvVars, -1)
seenEnvVar := false
for _, m := range matches {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册