Skip to content

Commit

Permalink
Refactoring: Remove vendoring from project (gardener#8775)
Browse files Browse the repository at this point in the history
* Remove vendor folder

Co-authored-by: Lukas Frank <lukas.frank@sap.com>

* Change make generate to work without vendoring

Co-authored-by: Lukas Frank <lukas.frank@sap.com>

* Change make generate to work without vendoring

Co-authored-by: Lukas Frank <lukas.frank@sap.com>

* Removed -mod=vendor

* Remove vendor folder from scaffold

Co-authored-by: Lukas Frank <lukas.frank@sap.com>

* Fix logchecker

* Fix codebase after rebasing

Co-authored-by: Lukas Frank <lukas.frank@sap.com>

* Adjust documentation

Co-authored-by: Lukas Frank <lukas.frank@sap.com>

* Refactor virtual gopath setup

* Create GOPATH/bin folder if it does not exist

* Add make tidy

* Update check-generate and docs

---------

Co-authored-by: Lukas Frank <lukas.frank@sap.com>
  • Loading branch information
afritzler and lukasfrank authored Nov 15, 2023
1 parent 328f202 commit 524084c
Show file tree
Hide file tree
Showing 8,821 changed files with 211 additions and 2,428,779 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ config.vmdk
/test/framework/resources/repository/cache
/test/framework/resources/shoots

hack/tools/logcheck/pkg/logcheck/testdata/src/github.com/go-logr/logr
hack/tools/logcheck/pkg/logcheck/testdata/src/sigs.k8s.io/controller-runtime/pkg/log

# Virtual go & fuse
.virtualgo
.fuse_hidden*
Expand Down
3 changes: 3 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ issues:
text: "SA1019:" # Excludes messages where deprecated variables are used

linters-settings:
loggercheck:
require-string-key: true
no-printf-like: true
revive:
rules:
- name: duplicated-imports
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/CreateShoot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/system/shoot_creation
go test -timeout=0 ./test/testmachinery/system/shoot_creation
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
-verbose=debug
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/DeleteShoot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/system/shoot_deletion
go test -timeout=0 ./test/testmachinery/system/shoot_deletion
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--shoot-name=$SHOOT_NAME
--project-namespace=$PROJECT_NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/HibernateShoot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/system/shoot_hibernation
go test -timeout=0 ./test/testmachinery/system/shoot_hibernation
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--shoot-name=$SHOOT_NAME
--project-namespace=$PROJECT_NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/MigrateShoot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/system/shoot_cp_migration
go test -timeout=0 ./test/testmachinery/system/shoot_cp_migration
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
-target-seed-name=$SEED_NAME
-shoot-name=$SHOOT_NAME
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/ReconcileShoots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/system/complete_reconcile
go test -timeout=0 ./test/testmachinery/system/complete_reconcile
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color --verbose=debug
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
-version=$GARDENER_VERSION
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/ShootKubernetesUpdateTest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/system/shoot_update
go test -timeout=0 ./test/testmachinery/system/shoot_update
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color -verbose=debug
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
-shoot-name=$SHOOT_NAME
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteGardenerBeta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/gardener
go test -timeout=0 ./test/testmachinery/suites/gardener
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteGardenerBetaSerial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/gardener
go test -timeout=0 ./test/testmachinery/suites/gardener
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteGardenerDefault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/gardener
go test -timeout=0 ./test/testmachinery/suites/gardener
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteGardenerDefaultSerial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/gardener
go test -timeout=0 ./test/testmachinery/suites/gardener
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteGardenerRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/gardener
go test -timeout=0 ./test/testmachinery/suites/gardener
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteGardenerReleaseSerial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/gardener
go test -timeout=0 ./test/testmachinery/suites/gardener
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteShootBeta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/shoot
go test -timeout=0 ./test/testmachinery/suites/shoot
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteShootBetaDisruptive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/shoot
go test -timeout=0 ./test/testmachinery/suites/shoot
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteShootBetaSerial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/shoot
go test -timeout=0 ./test/testmachinery/suites/shoot
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteShootDefault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/shoot
go test -timeout=0 ./test/testmachinery/suites/shoot
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteShootDefaultDisruptive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/shoot
go test -timeout=0 ./test/testmachinery/suites/shoot
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteShootDefaultSerial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/shoot
go test -timeout=0 ./test/testmachinery/suites/shoot
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteShootRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/shoot
go test -timeout=0 ./test/testmachinery/suites/shoot
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteShootReleaseDisruptive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/shoot
go test -timeout=0 ./test/testmachinery/suites/shoot
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/TestSuiteShootReleaseSerial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/shoot
go test -timeout=0 ./test/testmachinery/suites/shoot
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--report-file=$TM_EXPORT_PATH/report.json
-kubecfg=$TM_KUBECONFIG_PATH/gardener.config
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/WakeUpShoot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
command: [bash, -c]
args:
- >-
go test -timeout=0 -mod=vendor ./test/testmachinery/system/shoot_hibernation_wakeup
go test -timeout=0 ./test/testmachinery/system/shoot_hibernation_wakeup
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color
--shoot-name=$SHOOT_NAME
--project-namespace=$PROJECT_NAMESPACE
Expand Down
19 changes: 11 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,9 @@ docker-push:
# Rules for verification, formatting, linting, testing and cleaning #
#####################################################################

.PHONY: revendor
revendor:
.PHONY: tidy
tidy:
@GO111MODULE=on go mod tidy
@GO111MODULE=on go mod vendor
@cd $(LOGCHECK_DIR); go mod tidy

.PHONY: clean
Expand All @@ -155,9 +154,9 @@ check-plutono-dashboards:
@hack/check-plutono-dashboards.sh

.PHONY: check
check: $(GO_ADD_LICENSE) $(GOIMPORTS) $(GOLANGCI_LINT) $(HELM) $(IMPORT_BOSS) $(LOGCHECK) $(YQ)
check: $(GO_ADD_LICENSE) $(GOIMPORTS) $(GOLANGCI_LINT) $(HELM) $(IMPORT_BOSS) $(LOGCHECK) $(YQ) $(VGOPATH) logcheck-symlinks
@hack/check.sh --golangci-lint-config=./.golangci.yaml ./cmd/... ./extensions/... ./pkg/... ./plugin/... ./test/...
@hack/check-imports.sh ./charts/... ./cmd/... ./extensions/... ./pkg/... ./plugin/... ./test/... ./third_party/...
@VGOPATH=$(VGOPATH) hack/check-imports.sh ./charts/... ./cmd/... ./extensions/... ./pkg/... ./plugin/... ./test/... ./third_party/...

@echo "> Check $(LOGCHECK_DIR)"
@cd $(LOGCHECK_DIR); $(abspath $(GOLANGCI_LINT)) run -c $(REPO_ROOT)/.golangci.yaml --timeout 10m ./...
Expand All @@ -169,7 +168,11 @@ check: $(GO_ADD_LICENSE) $(GOIMPORTS) $(GOLANGCI_LINT) $(HELM) $(IMPORT_BOSS) $(
@hack/check-skaffold-deps.sh
@hack/check-plutono-dashboards.sh

tools-for-generate: $(CONTROLLER_GEN) $(GEN_CRD_API_REFERENCE_DOCS) $(GOIMPORTS) $(GO_TO_PROTOBUF) $(HELM) $(MOCKGEN) $(OPENAPI_GEN) $(PROTOC) $(PROTOC_GEN_GOGO) $(YAML2JSON) $(YQ)
.PHONY: logcheck-symlinks
logcheck-symlinks:
@LOGCHECK_DIR=$(LOGCHECK_DIR) ./hack/generate-logcheck-symlinks.sh

tools-for-generate: $(CONTROLLER_GEN) $(GEN_CRD_API_REFERENCE_DOCS) $(GOIMPORTS) $(GO_TO_PROTOBUF) $(HELM) $(MOCKGEN) $(OPENAPI_GEN) $(PROTOC) $(PROTOC_GEN_GOGO) $(YAML2JSON) $(YQ) $(VGOPATH)

define GENERATE_HELP_INFO
# Usage: make generate [WHAT="<targets>"] [MODE="<mode>"] [CODEGEN_GROUPS="<groups>"] [MANIFESTS_DIRS="<folders>"]
Expand Down Expand Up @@ -199,7 +202,7 @@ generate:
else
generate: tools-for-generate
@printf "\nFor more info on the generate command, Run 'make generate PRINT_HELP=y'\n"
@REPO_ROOT=$(REPO_ROOT) LOGCHECK_DIR=$(LOGCHECK_DIR) hack/generate.sh --what "$(WHAT)" --codegen-groups "$(CODEGEN_GROUPS)" --manifests-dirs "$(MANIFESTS_DIRS)" --mode "$(MODE)"
@REPO_ROOT=$(REPO_ROOT) VGOPATH=$(VGOPATH) LOGCHECK_DIR=$(LOGCHECK_DIR) hack/generate.sh --what "$(WHAT)" --codegen-groups "$(CODEGEN_GROUPS)" --manifests-dirs "$(MANIFESTS_DIRS)" --mode "$(MODE)"
$(MAKE) format
endif

Expand All @@ -209,7 +212,7 @@ format: $(GOIMPORTS) $(GOIMPORTSREVISER)
@cd $(LOGCHECK_DIR); $(abspath $(GOIMPORTS)) -l -w .

.PHONY: test
test: $(REPORT_COLLECTOR) $(PROMTOOL)
test: $(REPORT_COLLECTOR) $(PROMTOOL) logcheck-symlinks
@./hack/test.sh ./cmd/... ./extensions/pkg/... ./pkg/... ./plugin/...
@cd $(LOGCHECK_DIR); go test -race -timeout=2m ./... | grep -v 'no test files'

Expand Down
9 changes: 3 additions & 6 deletions docs/development/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@
We are using [go modules](https://github.com/golang/go/wiki/Modules) for depedency management.
In order to add a new package dependency to the project, you can perform `go get <PACKAGE>@<VERSION>` or edit the `go.mod` file and append the package along with the version you want to use.

## Updating Dependencies
# Updating Dependencies

The `Makefile` contains a rule called `revendor` which performs `go mod tidy` and `go mod vendor`:
The `Makefile` contains a rule called `tidy` which performs `go mod tidy`:
- `go mod tidy` makes sure `go.mod` matches the source code in the module. It adds any missing modules necessary to build the current module's packages and dependencies, and it removes unused modules that don't provide any relevant packages.
- `go mod vendor` resets the main module's vendor directory to include all packages needed to build and test all the main module's packages. It does not include test code for vendored packages.

```bash
make revendor
make tidy
```

The dependencies are installed into the `vendor` folder, which **should be added** to the VCS.

:warning: Make sure that you test the code after you have updated the dependencies!

## Exported Packages
Expand Down
6 changes: 3 additions & 3 deletions docs/development/new-kubernetes-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ After the PR in `gardener/gardener` for the support of the new version has been

> Actually, you can already start even if the PR is not yet merged and use the branch of your fork.
- Revendor the `github.com/gardener/gardener` dependency in the extension and update the `README.md`.
- Update the `github.com/gardener/gardener` dependency in the extension and update the `README.md`.
- Work on release-specific tasks related to this provider.

#### Maintaining the `cloud-controller-manager` Images
Expand All @@ -126,13 +126,13 @@ Instead, we build and maintain them ourselves:

- [cloud-provider-gcp](https://github.com/gardener/cloud-provider-gcp)

Until we switch to upstream images, you need to revendor the Kubernetes dependencies and release a new image.
Until we switch to upstream images, you need to update the Kubernetes dependencies and release a new image.
The required steps are as follows:

- Checkout the `legacy-cloud-provider` branch of the respective repository
- Bump the versions in the `Dockerfile` ([example commit](https://github.com/gardener/cloud-provider-gcp/commit/b7eb3f56b252aaf29adc78406672574b1bc17495)).
- Update the `VERSION` to `vX.Y.Z-dev` where `Z` is the latest available Kubernetes patch version for the `vX.Y` minor version.
- Update the `k8s.io/*` dependencies in the `go.mod` file to `vX.Y.Z` and run `go mod vendor` and `go mod tidy` ([example commit](https://github.com/gardener/cloud-provider-gcp/commit/d41cc9f035bcc4893b40d90a4f617c4d436c5d62)).
- Update the `k8s.io/*` dependencies in the `go.mod` file to `vX.Y.Z` and run `go mod tidy` ([example commit](https://github.com/gardener/cloud-provider-gcp/commit/d41cc9f035bcc4893b40d90a4f617c4d436c5d62)).
- Checkout a new `release-vX.Y` branch and release it ([example](https://github.com/gardener/cloud-provider-gcp/commits/release-v1.23))

> As you are already on it, it is great if you also bump the `k8s.io/*` dependencies for the last three minor releases as well.
Expand Down
16 changes: 8 additions & 8 deletions docs/development/testmachinery_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test
A suite can be executed by running the suite definition with ginkgo's `focus` and `skip` flags
to control the execution of specific labeled test. See the example below:
```console
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/shoot \
go test -timeout=0 ./test/testmachinery/suites/shoot \
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color \
--report-file=/tmp/report.json \ # write elasticsearch formatted output to a file
--disable-dump=false \ # disables dumping of teh current state if a test fails
Expand Down Expand Up @@ -96,7 +96,7 @@ var _ = ginkgo.Describe("my suite", func(){
The newly created test can be tested by focusing the test with the default ginkgo focus `f.Beta().FCIt("my first test", func(ctx context.Context)`
and running the shoot test suite with:
```
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/shoot \
go test -timeout=0 ./test/testmachinery/suites/shoot \
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color \
--report-file=/tmp/report.json \ # write elasticsearch formatted output to a file
--disable-dump=false \ # disables dumping of the current state if a test fails
Expand All @@ -107,7 +107,7 @@ go test -timeout=0 -mod=vendor ./test/testmachinery/suites/shoot \
```
or for the gardener suite with:
```
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/gardener \
go test -timeout=0 ./test/testmachinery/suites/gardener \
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color \
--report-file=/tmp/report.json \ # write elasticsearch formatted output to a file
--disable-dump=false \ # disables dumping of the current state if a test fails
Expand All @@ -119,7 +119,7 @@ go test -timeout=0 -mod=vendor ./test/testmachinery/suites/gardener \

Alternatively, a test can be triggered by specifying a ginkgo focus regex with the name of the test e.g.
```
go test -timeout=0 -mod=vendor ./test/testmachinery/suites/gardener \
go test -timeout=0 ./test/testmachinery/suites/gardener \
--v -ginkgo.v -ginkgo.show-node-events -ginkgo.no-color \
--report-file=/tmp/report.json \ # write elasticsearch formatted output to a file
-kubecfg=/path/to/gardener/kubeconfig \
Expand Down Expand Up @@ -250,7 +250,7 @@ Create Shoot test is meant to test shoot creation.
**Example Run**

```console
go test -mod=vendor -timeout=0 ./test/testmachinery/system/shoot_creation \
go test -timeout=0 ./test/testmachinery/system/shoot_creation \
--v -ginkgo.v -ginkgo.show-node-events \
-kubecfg=$HOME/.kube/config \
-shoot-name=$SHOOT_NAME \
Expand Down Expand Up @@ -279,7 +279,7 @@ Delete Shoot test is meant to test the deletion of a shoot.
**Example Run**

```console
go test -mod=vendor -timeout=0 -ginkgo.v -ginkgo.show-node-events \
go test -timeout=0 -ginkgo.v -ginkgo.show-node-events \
./test/testmachinery/system/shoot_deletion \
-kubecfg=$HOME/.kube/config \
-shoot-name=$SHOOT_NAME \
Expand All @@ -295,7 +295,7 @@ If there is no available newer version, this test is a noop.
**Example Run**

```console
go test -mod=vendor -timeout=0 ./test/testmachinery/system/shoot_update \
go test -timeout=0 ./test/testmachinery/system/shoot_update \
--v -ginkgo.v -ginkgo.show-node-events \
-kubecfg=$HOME/.kube/config \
-shoot-name=$SHOOT_NAME \
Expand All @@ -310,7 +310,7 @@ The Gardener Full Reconcile test is meant to test if all shoots of a Gardener in
**Example Run**

```console
go test -mod=vendor -timeout=0 ./test/testmachinery/system/complete_reconcile \
go test -timeout=0 ./test/testmachinery/system/complete_reconcile \
--v -ginkgo.v -ginkgo.show-node-events \
-kubecfg=$HOME/.kube/config \
-project-namespace=$PROJECT_NAMESPACE \
Expand Down
Loading

0 comments on commit 524084c

Please sign in to comment.