mirror of
https://github.com/cert-manager/webhook-example.git
synced 2025-07-03 07:05:50 +02:00
update script to fetch test binaries
This commit is contained in:
parent
7a722fd851
commit
76e7ffc50b
3 changed files with 14 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -13,3 +13,6 @@
|
||||||
|
|
||||||
# Ignore the built binary
|
# Ignore the built binary
|
||||||
cert-manager-webhook-example
|
cert-manager-webhook-example
|
||||||
|
|
||||||
|
# Test Binaries
|
||||||
|
kubebuilder
|
|
@ -9,6 +9,7 @@ import (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
zone = os.Getenv("TEST_ZONE_NAME")
|
zone = os.Getenv("TEST_ZONE_NAME")
|
||||||
|
kubeBuilderBinPath = "./kubebuilder/bin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRunsSuite(t *testing.T) {
|
func TestRunsSuite(t *testing.T) {
|
||||||
|
@ -17,6 +18,7 @@ func TestRunsSuite(t *testing.T) {
|
||||||
// ChallengeRequest passed as part of the test cases.
|
// ChallengeRequest passed as part of the test cases.
|
||||||
|
|
||||||
fixture := dns.NewFixture(&customDNSProviderSolver{},
|
fixture := dns.NewFixture(&customDNSProviderSolver{},
|
||||||
|
dns.SetBinariesPath(kubeBuilderBinPath),
|
||||||
dns.SetResolvedZone(zone),
|
dns.SetResolvedZone(zone),
|
||||||
dns.SetAllowAmbientCredentials(false),
|
dns.SetAllowAmbientCredentials(false),
|
||||||
dns.SetManifestPath("testdata/my-custom-solver"),
|
dns.SetManifestPath("testdata/my-custom-solver"),
|
||||||
|
|
|
@ -1 +1,10 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
os=$(go env GOOS)
|
||||||
|
arch=$(go env GOARCH)
|
||||||
|
|
||||||
|
# download kubebuilder and extract it to tmp
|
||||||
|
curl -L https://go.kubebuilder.io/dl/2.3.1/${os}/${arch} | tar -xz -C /tmp/
|
||||||
|
|
||||||
|
# move to a long-term location and put it on your path
|
||||||
|
# (you'll need to set the KUBEBUILDER_ASSETS env var if you put it somewhere else)
|
||||||
|
mv /tmp/kubebuilder_2.3.1_${os}_${arch} ./kubebuilder
|
Loading…
Reference in a new issue