Put API Ip in file to be used later
testing/og-dhcp-API/pipeline/head There was a failure building this commit
Details
testing/og-dhcp-API/pipeline/head There was a failure building this commit
Details
Pass base_URL as parameter to robotframeworknginx_conf
parent
7efa997f5f
commit
f425f599a7
|
@ -45,20 +45,26 @@ pipeline {
|
|||
sh '''
|
||||
set -e
|
||||
new_ip=$(vagrant ssh -c "hostname -I" | tr -d '\r\n' | sed 's/^[^0-9]*//' | sed 's/[[:space:]]*$//')
|
||||
echo $new_ip > ip.txt
|
||||
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: /'
|
||||
'''
|
||||
script {
|
||||
new_ip = readFile('ip.txt').trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Run API tests') {
|
||||
steps {
|
||||
dir ('tests/API-dhcp') {
|
||||
|
||||
echo 'Running API tests'
|
||||
|
||||
sh '''
|
||||
source robotframework/bin/activate
|
||||
robot -d results/ robot/
|
||||
. robotframework/bin/activate
|
||||
robot --variable BASE_URL:http://${new_ip}/ogdhcp/v1 -d results/ robot/
|
||||
'''
|
||||
}
|
||||
// Aquí incluirías los comandos para ejecutar tus pruebas
|
||||
|
|
Loading…
Reference in New Issue