fix gopogh
parent
650d7f3dee
commit
1e41de57bd
|
@ -71,7 +71,7 @@ jobs:
|
|||
START_TIME=$(date -u +%s)
|
||||
KIC_VERSION=$(egrep "Version =" pkg/drivers/kic/types.go | cut -d \" -f2)
|
||||
KIC_IMG_HEAD="local/kicbase:${KIC_VERSION}-snapshot"
|
||||
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args="--vm-driver=docker --base-image=${KIC_IMG_HEAD}" -test.v -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
||||
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args="--vm-driver=docker --base-image=${KIC_IMG_HEAD}" -test.run TestOffline -test.v -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
|
||||
END_TIME=$(date -u +%s)
|
||||
TIME_ELAPSED=$(($END_TIME-$START_TIME))
|
||||
min=$((${TIME_ELAPSED}/60))
|
||||
|
@ -84,7 +84,7 @@ jobs:
|
|||
cd out
|
||||
export PATH=${PATH}:`go env GOPATH`/bin
|
||||
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
|
||||
STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "${JOB_NAME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}" -details "${GITHUB_SHA}") || true
|
||||
STAT=$(/usr/local/bin/gopogh -in ./report/testout.json -out ./report/testout.html -name "${JOB_N AME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}" -details "${GITHUB_SHA}") || true
|
||||
echo status: ${STAT}
|
||||
FailNum=$(echo $STAT | jq '.NumberOfFail' || true)
|
||||
TestsNum=$(echo $STAT | jq '.NumberOfTests' || true)
|
||||
|
|
|
@ -23,7 +23,6 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
@ -42,18 +41,14 @@ func TestOffline(t *testing.T) {
|
|||
ctx, cancel := context.WithTimeout(context.Background(), Minutes(15))
|
||||
defer CleanupWithLogs(t, profile, cancel)
|
||||
|
||||
profileStartArgs := []string{"start", "-p", profile, "--alsologtostderr", "-v=1", "--memory=2000", "--wait=true", "--container-runtime", runtime}
|
||||
profileStartArgs = append(profileStartArgs, StartArgs()...)
|
||||
c := exec.CommandContext(ctx, Target(), profileStartArgs...)
|
||||
startArgs := []string{"start", "-p", profile, "--alsologtostderr", "-v=1", "--memory=2000", "--wait=true", "--container-runtime", runtime}
|
||||
startArgs = append(startArgs, StartArgs()...)
|
||||
c := exec.CommandContext(ctx, Target(), startArgs...)
|
||||
env := os.Environ()
|
||||
// RFC1918 address that unlikely to host working a proxy server
|
||||
env = append(env, "HTTP_PROXY=172.16.1.1:1")
|
||||
env = append(env, "HTTP_PROXYS=172.16.1.1:1")
|
||||
if !strings.Contains(*startArgs, "base-image") {
|
||||
env = append(env, "DOCKER_HOST=172.16.1.1:1")
|
||||
} else {
|
||||
t.Log("Because base-image flag was set, will not test pointing DOCKER_HOST to a wrong docker.")
|
||||
}
|
||||
env = append(env, "DOCKER_HOST=172.16.1.1:1")
|
||||
|
||||
c.Env = env
|
||||
rr, err := Run(t, c)
|
||||
|
|
|
@ -155,3 +155,8 @@ func Minutes(n int) time.Duration {
|
|||
func Seconds(n int) time.Duration {
|
||||
return time.Duration(*timeOutMultiplier) * time.Duration(n) * time.Second
|
||||
}
|
||||
|
||||
// TestingKicBaseImage will return true if the integraiton test is running against a passed --base-image flag
|
||||
func TestingKicBaseImage() bool {
|
||||
return strings.Contains(*startArgs, "base-image")
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ func legacyStartArgs() []string {
|
|||
// TestRunningBinaryUpgrade does an upgrade test on a running cluster
|
||||
func TestRunningBinaryUpgrade(t *testing.T) {
|
||||
// not supported till v1.10, and passing new images to old releases isn't supported anyways
|
||||
if strings.Contains(*startArgs, "base-image") {
|
||||
if TestingKicBaseImage() {
|
||||
t.Skipf("Skipping, test does not make sense with --base-image")
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ func TestRunningBinaryUpgrade(t *testing.T) {
|
|||
// TestStoppedBinaryUpgrade does an upgrade test on a stopped cluster
|
||||
func TestStoppedBinaryUpgrade(t *testing.T) {
|
||||
// not supported till v1.10, and passing new images to old releases isn't supported anyways
|
||||
if strings.Contains(*startArgs, "base-image") {
|
||||
if TestingKicBaseImage() {
|
||||
t.Skipf("Skipping, test does not make sense with --base-image")
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ func TestMissingContainerUpgrade(t *testing.T) {
|
|||
}
|
||||
|
||||
// not supported till v1.10, and passing new images to old releases isn't supported anyways
|
||||
if strings.Contains(*startArgs, "base-image") {
|
||||
if TestingKicBaseImage() {
|
||||
t.Skipf("Skipping, test does not make sense with --base-image")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue