From c4e12e6d86e6d0c0d9575d223dc00df863aaea49 Mon Sep 17 00:00:00 2001 From: lyyyuna Date: Fri, 11 Sep 2020 16:06:35 +0800 Subject: [PATCH] fix ci --- .github/workflows/e2e_test_check.yml | 2 +- .github/workflows/style_check.yml | 2 +- .github/workflows/ut_check.yml | 2 +- pkg/cover/server_test.go | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e_test_check.yml b/.github/workflows/e2e_test_check.yml index 4739346..fe0ea5d 100644 --- a/.github/workflows/e2e_test_check.yml +++ b/.github/workflows/e2e_test_check.yml @@ -41,7 +41,7 @@ jobs: needs: job_1 strategy: matrix: - go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x] + go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x] runs-on: ubuntu-latest steps: - name: Install Go diff --git a/.github/workflows/style_check.yml b/.github/workflows/style_check.yml index ebc98ba..568d0d4 100644 --- a/.github/workflows/style_check.yml +++ b/.github/workflows/style_check.yml @@ -13,7 +13,7 @@ jobs: name: vet and gofmt strategy: matrix: - go-version: [1.13.x, 1.14.x] + go-version: [1.13.x, 1.14.x, 1.15.x] runs-on: ubuntu-latest steps: - name: Install Go diff --git a/.github/workflows/ut_check.yml b/.github/workflows/ut_check.yml index 0b9d311..417d0d2 100644 --- a/.github/workflows/ut_check.yml +++ b/.github/workflows/ut_check.yml @@ -13,7 +13,7 @@ jobs: name: go test strategy: matrix: - go-version: [1.13.x, 1.14.x] + go-version: [1.13.x, 1.14.x, 1.15.x] runs-on: ubuntu-latest steps: - name: Install Go diff --git a/pkg/cover/server_test.go b/pkg/cover/server_test.go index 62b75d4..10d4d49 100644 --- a/pkg/cover/server_test.go +++ b/pkg/cover/server_test.go @@ -1,6 +1,7 @@ package cover import ( + "bytes" "fmt" "net/http" "net/http/httptest" @@ -188,7 +189,7 @@ func TestClearService(t *testing.T) { // get profile with invalid force parameter w := httptest.NewRecorder() - req, _ := http.NewRequest("POST", "/v1/cover/clear", nil) + req, _ := http.NewRequest("POST", "/v1/cover/clear", bytes.NewBuffer([]byte(`{}`))) router.ServeHTTP(w, req) assert.Equal(t, http.StatusExpectationFailed, w.Code)