Fix flaky TestGetObjectWithOutdatedDisks (#15687)

On occasion this test fails:

```
2022-09-12T17:22:44.6562737Z === RUN   TestGetObjectWithOutdatedDisks
2022-09-12T17:22:44.6563751Z     erasure-object_test.go:1214: Test 2: Expected data to have md5sum = `c946b71bb69c07daf25470742c967e7c`, found `7d16d23f07072af1a809707ba101ae07`
2
```

Theory: Both objects are written with the same timestamp due to lower timer resolution on Windows. This results in secondary resolution, which is deterministic, but random.

Solution: Instead of hacking in a wait we request the specific version we want. Should still keep the test relevant.

Bonus: Remote action dependency for vulncheck
This commit is contained in:
Klaus Post
2022-09-14 17:17:39 +02:00
committed by GitHub
parent fb8d512f58
commit 5c61c3ccdc
4 changed files with 33 additions and 10 deletions

View File

@@ -2,8 +2,10 @@ name: VulnCheck
on:
pull_request:
branches:
- master
- master
push:
branches:
- master
jobs:
vulncheck:
name: Analysis
@@ -11,9 +13,14 @@ jobs:
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- uses: actions/setup-go@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
check-latest: true
- name: Check for vulnerabilities
uses: kmulvey/govulncheck-action@v1.0.0
- name: Get official govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
shell: bash
- name: Run govulncheck
run: govulncheck ./...
shell: bash