From 9828f370be7b435c53baf9abd99455b7a5f58dd1 Mon Sep 17 00:00:00 2001 From: Gregan Date: Thu, 29 Jul 2021 16:59:23 +0200 Subject: [PATCH] ajout tests --- testWeb.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/testWeb.sh b/testWeb.sh index a0d808d..d08da7a 100755 --- a/testWeb.sh +++ b/testWeb.sh @@ -1,11 +1,7 @@ #!/bin/bash echo "TEST HUGO" - -$response="curl http://localhost:6060" -if [$reponse=="HTTP/1.1 200 OK"] +response=$(curl -s -o /dev/null -w "%{http_code}\n" http://localhost:6060") +if ["$reponse" != "200"] then - exit 0 -else exit 1 -fi