diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 693bed8f..f99c0aca 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -18,7 +18,7 @@ jobs: - name: Install dependencies run: go mod tidy - name: Run tests with coverage - run: go test -v -coverprofile="coverage.out" ./... + run: sudo go test -v -coverprofile="coverage.out" ./... - name: Upload coverage report to Codecov uses: codecov/codecov-action@v4 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c51562f2..babeca06 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,4 +21,4 @@ jobs: run: | cp config.example.yml config.yml - name: Run tests - run: go test ./... \ No newline at end of file + run: sudo go test ./... \ No newline at end of file diff --git a/pkg/ntp/ntp_test.go b/pkg/ntp/ntp_test.go index 6982908b..6cee6a51 100644 --- a/pkg/ntp/ntp_test.go +++ b/pkg/ntp/ntp_test.go @@ -37,7 +37,7 @@ func (suite *NTPTestSuite) TestUpdateSystemTime() { suite.T().Skip("Skipping on Windows") } err := UpdateSystemTime(time.Now()) - suite.Error(err) // GitHub action not support + suite.NoError(err) } func (suite *NTPTestSuite) TestUpdateSystemTimeZone() {