summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2017-10-30 23:11:24 -0400
committerDave Henderson <dhenderson@gmail.com>2017-10-30 23:11:24 -0400
commitc2d3203a9df19ea6a0abeb513cdf38fe4b8cabc4 (patch)
tree38f4e37289e3411485501d0d4deb906d6105420d /test
parent97a60c39c501ceffdc8e7fb171e41bab0c18d11b (diff)
Stabilizing integration tests a bit
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/integration/helper.bash8
-rw-r--r--test/integration/metasvc/main.go5
2 files changed, 7 insertions, 6 deletions
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")