mirror of https://github.com/0xERR0R/blocky.git
* go test -> ginkgo * added FlakeAttempts to flaky test definition Co-authored-by: Dimitri Herzog <dimitri.herzog@gmail.com>
This commit is contained in:
parent
988556dc80
commit
061419f68f
6
Makefile
6
Makefile
|
@ -32,10 +32,12 @@ build: ## Build binary
|
|||
go build -v -ldflags="-w -s -X github.com/0xERR0R/blocky/util.Version=${VERSION} -X github.com/0xERR0R/blocky/util.BuildTime=${BUILD_TIME}" -o $(BIN_OUT_DIR)/$(BINARY_NAME)$(BINARY_SUFFIX)
|
||||
|
||||
test: ## run tests
|
||||
go test -v -coverprofile=coverage.txt -covermode=atomic -cover ./...
|
||||
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
|
||||
$(shell go env GOPATH)/bin/ginkgo -v --coverprofile=coverage.txt --covermode=atomic -cover ./...
|
||||
|
||||
race: ## run tests with race detector
|
||||
go test -race -short ./...
|
||||
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
|
||||
$(shell go env GOPATH)/bin/ginkgo --race ./...
|
||||
|
||||
lint: build ## run golangcli-lint checks
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
|
||||
|
|
|
@ -200,7 +200,7 @@ var _ = Describe("Downloader", func() {
|
|||
WithAttempts(3),
|
||||
WithCooldown(time.Millisecond))
|
||||
})
|
||||
It("Should perform a retry until max retry attempt count is reached and return DNSError", func() {
|
||||
It("Should perform a retry until max retry attempt count is reached and return DNSError", FlakeAttempts(5), func() {
|
||||
reader, err := sut.DownloadFile("http://some.domain.which.does.not.exist")
|
||||
Expect(err).Should(HaveOccurred())
|
||||
var dnsError *net.DNSError
|
||||
|
|
Loading…
Reference in New Issue