From 2ade9775cc7677cc7a382ab410618e207dcee1e3 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 1 Oct 2024 17:39:16 +0200 Subject: [PATCH] Fix problem with ip space at the end --- tests/API-dhcp/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/API-dhcp/Jenkinsfile b/tests/API-dhcp/Jenkinsfile index f1b9cd6..9ab7ef8 100644 --- a/tests/API-dhcp/Jenkinsfile +++ b/tests/API-dhcp/Jenkinsfile @@ -37,7 +37,7 @@ pipeline { echo "Get IP of API server for DHCP with Vagrant" sh ''' set -e - new_ip=$(vagrant ssh -c "hostname -I" | tr -d '\r') + new_ip=$(vagrant ssh -c "hostname -I" | tr -d '\r' | sed 's/[[:space:]]*$//') echo "$QINDEL_PASS" | sudo -S bash -c "echo '$new_ip api-test' >> /etc/hosts" echo "IP: $new_ip" curl -X 'GET' "http://$new_ip/ogdhcp/v1/subnets" -H 'accept: /'