From c2d3203a9df19ea6a0abeb513cdf38fe4b8cabc4 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Mon, 30 Oct 2017 23:11:24 -0400 Subject: Stabilizing integration tests a bit Signed-off-by: Dave Henderson --- test/integration/helper.bash | 8 ++++---- test/integration/metasvc/main.go | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/integration/helper.bash b/test/integration/helper.bash index 7f5cc85f..dd406b09 100644 --- a/test/integration/helper.bash +++ b/test/integration/helper.bash @@ -31,15 +31,15 @@ function start_mirror_svc () { } function stop_mirror_svc () { - wget -q http://127.0.0.1:8080/quit + wget -q -O - http://127.0.0.1:8080/quit } function start_meta_svc () { - bin/meta 3>/dev/null & + bin/meta &> /tmp/meta.log & } function stop_meta_svc () { - wget -q http://127.0.0.1:8081/quit + wget -q -O - http://127.0.0.1:8081/quit } function start_aws_svc () { @@ -47,7 +47,7 @@ function start_aws_svc () { } function stop_aws_svc () { - wget -q http://127.0.0.1:8082/quit + wget -q -O - http://127.0.0.1:8082/quit } function wait_for_url () { diff --git a/test/integration/metasvc/main.go b/test/integration/metasvc/main.go index 4a1d2626..108b9e39 100644 --- a/test/integration/metasvc/main.go +++ b/test/integration/metasvc/main.go @@ -41,8 +41,6 @@ func main() { flag.StringVar(&port, "p", "8081", "Port to listen to") flag.Parse() - certificateGenerate() - l, err := net.Listen("tcp", ":"+port) if err != nil { log.Fatal(err) @@ -128,6 +126,9 @@ func documentHandler(w http.ResponseWriter, r *http.Request) { } func certificateHandler(w http.ResponseWriter, r *http.Request) { + if derBytes == nil { + certificateGenerate() + } encoded := pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: derBytes}) w.Header().Set("Content-Type", "text/plain") -- cgit v1.2.3