Skip to content

Commit 2df7880

Browse files
Setup issuance hierarchy in startservers.py (letsencrypt#4846)
Once we de-dupe startservers.install calls we may want to move setupHierarchy there, but for now we need to call it from integration-test.py and start.py. Fixes letsencrypt#4842
1 parent 7673f02 commit 2df7880

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ env:
2828
- RUN="integration" BOULDER_CONFIG_DIR="test/config-next"
2929
- RUN="unit"
3030
- RUN="unit-next" BOULDER_CONFIG_DIR="test/config-next"
31-
- RUN="start"
31+
- RUN="start" BOULDER_CONFIG_DIR="test/config"
3232
# gomod-vendor runs with a separate container because it needs to fetch
3333
# packages from GitHub et. al., which is incompatible with the DNS server
3434
# override in the boulder container (used for service discovery).

start.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
sys.path.append('./test')
1717
import startservers
1818

19+
# Setup issuance hierarchy
20+
startservers.setupHierarchy()
21+
1922
if not startservers.start(race_detection=False, fakeclock=None):
2023
sys.exit(1)
2124
try:

test.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,25 +101,20 @@ if [[ "$RUN" =~ "integration" ]] ; then
101101
args+=("--filter" "${INT_FILTER}")
102102
fi
103103

104-
# We want to setup our 'HSM' before we get into the python part
105-
# of the integration tests. To do this we need to build the ceremony
106-
# binary, which is typically done in test/startservers.py.
107-
GOBIN=$(pwd)/bin go install ./cmd/ceremony
108-
go run test/cert-ceremonies/generate.go
109-
110104
python3 test/integration-test.py --chisel --gotest "${args[@]}"
111105
fi
112106

113107
# Test that just ./start.py works, which is a proxy for testing that
114108
# `docker-compose up` works, since that just runs start.py (via entrypoint.sh).
115109
if [[ "$RUN" =~ "start" ]] ; then
116-
./start.py &
110+
python3 start.py &
117111
for I in $(seq 1 100); do
118112
sleep 1
119113
curl http://localhost:4000/directory && break
120114
done
121115
if [[ $I = 100 ]]; then
122116
echo "Boulder did not come up after ./start.py."
117+
exit 1
123118
fi
124119
fi
125120

test/integration-test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ def main():
261261
if not (args.run_certbot or args.run_chisel or args.custom or args.run_go is not None):
262262
raise(Exception("must run at least one of the letsencrypt or chisel tests with --certbot, --chisel, --gotest, or --custom"))
263263

264+
# Setup issuance hierarchy
265+
startservers.setupHierarchy()
266+
264267
if not args.test_case_filter:
265268
now = datetime.datetime.utcnow()
266269

test/startservers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
# to run the load-generator).
1818
challSrvProcess = None
1919

20+
def setupHierarchy():
21+
e = os.environ.copy()
22+
e.setdefault("GOBIN", "%s/bin" % os.getcwd())
23+
subprocess.call("go install ./cmd/ceremony", shell=True, env=e)
24+
subprocess.call("go run test/cert-ceremonies/generate.go", shell=True, env=e)
25+
26+
2027
def install(race_detection):
2128
# Pass empty BUILD_TIME and BUILD_ID flags to avoid constantly invalidating the
2229
# build cache with new BUILD_TIMEs, or invalidating it on merges with a new

0 commit comments

Comments
 (0)