summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")