diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 641fad18..89d04017 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -27,9 +27,4 @@ jobs: with: fetch-depth: 0 - name: e2e-test - env: - GOVC_USERNAME: ${{ secrets.GOVC_USERNAME }} - GOVC_PASSWORD: ${{ secrets.GOVC_PASSWORD }} - GOVC_URL: ${{ secrets.GOVC_URL }} - GOVC_DATACENTER: ${{ secrets.GOVC_DATACENTER }} run: make e2e-test diff --git a/Makefile b/Makefile index 80d080e0..a7ef9f85 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,11 @@ clean: docker rmi -f $(shell docker images -f dangling=true -qa) unit-test: - bash test/unit-test.sh + go test -race -coverprofile=coverage.txt -covermode=atomic ./pkg/... + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov +# bash test/unit-test.sh e2e-test: bash test/e2e-test.sh diff --git a/test/e2e-test.sh b/test/e2e-test.sh index ae84cd4f..d79aa32a 100644 --- a/test/e2e-test.sh +++ b/test/e2e-test.sh @@ -2,10 +2,6 @@ # simple scripts mng machine # link hosts export GOVC_INSECURE=1 -export GOVC_USERNAME="panyintian.fu@daocloud.io" -export GOVC_PASSWORD="rcZa9FY6EiwnYk8!" -export GOVC_URL="https://192.168.1.136:443" -export GOVC_DATACENTER="DaoCloud-NDX-Fusion" export GOVC_RESOURCE_POOL="e2e" export hosts="fupan-e2e-k8s-master fupan-e2e-k8s-node1 fupan-e2e-k8s-node2" export snapshot="e2etest" @@ -17,7 +13,6 @@ export snapshot="e2etest" # govc find . -type m -runtime.powerState poweredOn # govc find . -type m -runtime.powerState poweredOn | xargs govc vm.info # govc vm.info $hosts - set -e for h in $hosts; do if [[ `govc vm.info $h | grep poweredOn | wc -l` -eq 1 ]]; then diff --git a/test/e2e/SmokeTest/lsVolume.go b/test/e2e/SmokeTest/lsVolume.go index 2430d7b6..11ab2751 100644 --- a/test/e2e/SmokeTest/lsVolume.go +++ b/test/e2e/SmokeTest/lsVolume.go @@ -22,7 +22,7 @@ import ( "time" ) -var _ = ginkgo.Describe("test localstorage volume ", ginkgo.Label("smokeTest"), func() { +var _ = ginkgo.Describe("test localstorage volume ", ginkgo.Label("smokeTest"), func() { f := framework.NewDefaultFramework(apis.AddToScheme) client := f.GetClient()