Use letsencrypt/boulder as ACME server in e2e tests
This commit is contained in:
parent
0f5c11bb03
commit
7faf792b9d
@ -6,6 +6,8 @@ jobs:
|
||||
go: 1.8
|
||||
env:
|
||||
- KUBERNETES_VERSION=v1.7.0
|
||||
before_script:
|
||||
- ./hack/test/setup-boulder.sh
|
||||
script:
|
||||
- set -e
|
||||
- curl -Lo helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-v2.6.1-linux-amd64.tar.gz && tar xvf helm.tar.gz && sudo mv linux-amd64/helm /usr/local/bin
|
||||
|
||||
27
hack/test/setup-boulder.sh
Executable file
27
hack/test/setup-boulder.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
BOULDER_REPO="github.com/letsencrypt/boulder"
|
||||
|
||||
echo "Fetching ${BOULDER_REPO}"
|
||||
go get -d github.com/letsencrypt/boulder || true
|
||||
echo "Retrieved boulder repository"
|
||||
cd "${GOPATH}/src/${BOULDER_REPO}"
|
||||
|
||||
# Modify boulder configuration
|
||||
sed -i 's/FAKE_DNS: 127.0.0.1/FAKE_DNS: 10.0.0.10/' docker-compose.yml
|
||||
sed -i 's/127.0.0.1:8053/10.0.0.10:53/' test/config/va.json
|
||||
sed -i 's/5002/80/' test/config/va.json
|
||||
# TODO: set ratelimits
|
||||
|
||||
docker-compose up &
|
||||
|
||||
while ! curl http://localhost:4000/ > /dev/null 2>&1 ; do
|
||||
echo "Waiting for boulder API to be available..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Boulder API now available at http://localhost:4000/"
|
||||
@ -71,7 +71,7 @@ var _ = framework.CertManagerDescribe("ACME Issuer", func() {
|
||||
})
|
||||
})
|
||||
|
||||
const testingACMEURL = "https://acme-staging.api.letsencrypt.org/directory"
|
||||
const testingACMEURL = "http://127.0.0.1:4000/directory"
|
||||
const invalidACMEURL = "http://not-a-real-acme-url.com"
|
||||
const testingACMEEmail = "test@example.com"
|
||||
const testingACMEPrivateKey = "test-acme-private-key"
|
||||
|
||||
@ -103,6 +103,7 @@ func NewCertManagerControllerPod(name string, args ...string) *v1.Pod {
|
||||
},
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
HostNetwork: true,
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: name,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user