-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Implement integration tests with vault. It also fixes a bug where getting the credentials for a consumer provider lead to a deadlock or potentially an infinite recursion since we attempt to retrieve credentials to access the credential provider from the credential provider itself. Introduces an additional make target called `make test-all`. This runs all test including the ones tagged with `go:build integration`.
- Loading branch information
1 parent
70f1588
commit 93c6bad
Showing
26 changed files
with
926 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ bin/ | |
go.mod.bak | ||
dist/ | ||
.cache_ggshield | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## ocm controller uninstall — Uninstalls The Ocm-Controller And All Of Its Dependencies | ||
|
||
### Synopsis | ||
|
||
``` | ||
ocm controller uninstall controller | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-u, --base-url string the base url to the ocm-controller's release page (default "https://github.com/open-component-model/ocm-controller/releases") | ||
--cert-manager-base-url string the base url to the cert-manager's release page (default "https://github.com/cert-manager/cert-manager/releases") | ||
--cert-manager-release-api-url string the base url to the cert-manager's API release page (default "https://api.github.com/repos/cert-manager/cert-manager/releases") | ||
--cert-manager-version string version for cert-manager (default "v1.13.2") | ||
-c, --controller-name string name of the controller that's used for status check (default "ocm-controller") | ||
-d, --dry-run if enabled, prints the downloaded manifest file | ||
-h, --help help for uninstall | ||
-n, --namespace string the namespace into which the controller is installed (default "ocm-system") | ||
-a, --release-api-url string the base url to the ocm-controller's API release page (default "https://api.github.com/repos/open-component-model/ocm-controller/releases") | ||
-t, --timeout duration maximum time to wait for deployment to be ready (default 1m0s) | ||
-p, --uninstall-prerequisites uninstall prerequisites required by ocm-controller | ||
-v, --version string the version of the controller to install (default "latest") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
##### Parents | ||
|
||
* [ocm controller](ocm_controller.md) — Commands acting on the ocm-controller | ||
* [ocm](ocm.md) — Open Component Model command line client | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
//go:generate mdref --headings --list docsrc . | ||
//go:generate mdref --headings docsrc . | ||
|
||
package tour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
GOPATH := $(shell go env GOPATH) | ||
LOCALBIN := $(shell pwd)/../bin | ||
OS := $(shell go env GOOS 2>/dev/null || sh -c 'uname -o' | sed 's/.*/\L&/' ) | ||
ARCH := $(shell go env GOARCH 2>/dev/null || sh -c 'uname -m' | sed 's/.*/\L&/' ) | ||
OS_ARCH := $(OS)_$(ARCH) | ||
|
||
ifeq ($(OS),Windows_NT) | ||
detected_OS := Windows | ||
|
@@ -39,6 +43,16 @@ GO_BINDATA := $(shell (go-bindata -version 2>/dev/null || echo 0.0.0) | head -n | |
ifneq ("v$(GO_BINDATA)",$(GO_BINDATA_VERSION)) | ||
deps += go-bindata | ||
endif | ||
VAULT_VERSION := 1.16.2 | ||
VAULT := $(shell ($(LOCALBIN)/vault --version 2>/dev/null || echo 0.0) | sed 's/.*Vault v\([0-9\.]*\).*/\1/') | ||
ifeq ($(VAULT), $(VAULT_VERSION)) | ||
deps += vault | ||
endif | ||
OCI_REGISTRY_VERSION := 3.0.0-alpha.1 | ||
OCI_REGISTRY := $(shell (registry --version 2>/dev/null || echo 0.0) | sed 's/.* v\([0-9a-z\.\-]*\).*/\1/') | ||
ifeq ($(OCI_REGISTRY), $(OCI_REGISTRY_VERSION)) | ||
deps += oci-registry | ||
endif | ||
|
||
.PHONY: install-requirements | ||
install-requirements: $(deps) $(GOPATH)/bin/goimports mdref | ||
|
@@ -58,14 +72,28 @@ golangci-lint-version: | |
go-bindata: | ||
go install -v github.com/go-bindata/go-bindata/v3/...@$(GO_BINDATA_VERSION) | ||
|
||
.PHONY: vault | ||
vault: | ||
@if [ "$(VAULT)" != "$(VAULT_VERSION)" ]; then \ | ||
curl -o $(LOCALBIN)/vault.zip https://releases.hashicorp.com/vault/$(VAULT_VERSION)/vault_$(VAULT_VERSION)_$(OS_ARCH).zip; \ | ||
unzip -o $(LOCALBIN)/vault.zip -d $(LOCALBIN); \ | ||
rm $(LOCALBIN)/vault.zip; \ | ||
chmod a+x $(LOCALBIN)/vault;\ | ||
fi | ||
|
||
.PHONY: oci-registry | ||
oci-registry: | ||
@if [ "$(OCI_REGISTRY)" != "$(OCI_REGISTRY_VERSION)" ]; then \ | ||
go install -v github.com/distribution/distribution/v3/cmd/[email protected]; \ | ||
fi | ||
|
||
$(GOPATH)/bin/goimports: | ||
go install -v golang.org/x/tools/cmd/goimports@latest | ||
|
||
.PHONY: mdref | ||
mdref: | ||
go install -v github.com/mandelsoft/mdref@master | ||
|
||
|
||
Linux_jq: | ||
$(info -> jq is missing) | ||
$(info - sudo apt-get install jq / sudo dnf install jq / sudo zypper install jq / sudo pacman -S jq) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.