Skip to content

Commit

Permalink
Move to Go 1.18
Browse files Browse the repository at this point in the history
Signed-off-by: Ken Sipe <kensipe@gmail.com>
  • Loading branch information
kensipe committed Apr 12, 2022
1 parent 318b13c commit 5810bb1
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

lint:
docker:
- image: kudobuilder/golang:1.17
- image: kudobuilder/golang:1.18
working_directory: /go/src/github.com/kudobuilder/kuttl
steps:
- checkout
Expand Down
4 changes: 3 additions & 1 deletion hack/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ then
echo "Running E2E tests with junit output"
mkdir -p reports/
go get github.com/jstemmer/go-junit-report

go install github.com/jstemmer/go-junit-report
go mod tidy

./bin/kubectl-kuttl test pkg/test/test_data/ 2>&1 \
| tee /dev/fd/2 \
| go-junit-report -set-exit-code \
Expand Down
2 changes: 2 additions & 0 deletions hack/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ then
echo "Running integration tests with junit output"
mkdir -p reports/
go get github.com/jstemmer/go-junit-report
go install github.com/jstemmer/go-junit-report
go mod tidy
go test -tags integration ./pkg/... -v -mod=readonly -coverprofile cover-integration.out 2>&1 |tee /dev/fd/2 |go-junit-report -set-exit-code > reports/integration_report.xml
else
echo "Running integration tests without junit output"
Expand Down
41 changes: 40 additions & 1 deletion pkg/test/utils/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import (
"fmt"
"io"
"os"
"reflect"
"regexp"
"runtime/pprof"
"testing"
"time"
)

// RunTests runs a Go test method without requiring the Go compiler.
Expand Down Expand Up @@ -44,7 +46,7 @@ func RunTests(testName string, testToRun string, parallelism int, testFunc func(
Name: testName,
F: testFunc,
},
}, nil, nil).Run())
}, nil, nil, nil).Run())
}

// testDeps implements the testDeps interface for MainStart.
Expand Down Expand Up @@ -89,3 +91,40 @@ func (testDeps) StartTestLog(w io.Writer) {}
func (testDeps) StopTestLog() error {
return nil
}

func (testDeps) CoordinateFuzzing(time.Duration, int64, time.Duration, int64, int, []corpusEntry, []reflect.Type, string, string) error {
return nil
}

func (testDeps) RunFuzzWorker(func(corpusEntry) error) error {
return nil
}

func (testDeps) ReadCorpus(string, []reflect.Type) ([]corpusEntry, error) {
return nil, nil
}

func (testDeps) CheckCorpus([]interface{}, []reflect.Type) error {
return nil
}

func (testDeps) ResetCoverage() {

}

func (testDeps) SnapshotCoverage() {

}

// corpusEntry is from the public go testing which references an internal structure.
// corpusEntry is an alias to the same type as internal/fuzz.CorpusEntry.
// We use a type alias because we don't want to export this type, and we can't
// import internal/fuzz from testing.
type corpusEntry = struct {
Parent string
Path string
Data []byte
Values []interface{}
Generation int
IsSeed bool
}
2 changes: 1 addition & 1 deletion test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM kudobuilder/golang:1.13
FROM kudobuilder/golang:1.18

WORKDIR $GOPATH/src/github.com/kudobuilder/kuttl

Expand Down

0 comments on commit 5810bb1

Please sign in to comment.