Skip to content

Commit

Permalink
Fix RetryUntilPredicate tests, upgrade go lang version to v1.19.4 (#73)
Browse files Browse the repository at this point in the history
* fix RetryUntilPredicate tests

* upgrade go version to 1.19.4
  • Loading branch information
rishabh-11 authored Jan 6, 2023
1 parent ef32643 commit 101f06e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .ci/pipeline_definitions
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ dependency-watchdog:
build: ~
steps:
check:
image: 'golang:1.19.3'
image: 'golang:1.19.4'
test-unit:
image: 'golang:1.19.3'
image: 'golang:1.19.4'
build:
image: 'golang:1.19.3'
image: 'golang:1.19.4'
output_dir: 'binary'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19.3 AS builder
FROM golang:1.19.4 AS builder

WORKDIR /go/src/github.com/gardener/dependency-watchdog
COPY . .
Expand Down
6 changes: 0 additions & 6 deletions internal/util/retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,12 @@ func TestRetryUntilPredicateForContextCancelled(t *testing.T) {
}

func TestRetryUntilPredicateWithBackgroundContext(t *testing.T) {
counter := 0
table := []struct {
predicateFn func() bool
expectedResult bool
}{
{func() bool { return false }, false},
{func() bool { return true }, true},
{func() bool {
counter++
return counter%2 == 0
}, true},
}
for _, entry := range table {
g := NewWithT(t)
Expand All @@ -154,7 +149,6 @@ func TestRetryUntilPredicateWithBackgroundContext(t *testing.T) {
}()
wg.Wait()
}

}

func TestRetryOnError(t *testing.T) {
Expand Down

0 comments on commit 101f06e

Please sign in to comment.