diff --git a/src/test/shell/data/inventory/kubernetes/kubernetes-1.json b/src/test/shell/data/inventory/kubernetes/kubernetes-1.json deleted file mode 100644 index 25e8b12d17dfe532d262a425af7e7ec55b6a2f1b..0000000000000000000000000000000000000000 --- a/src/test/shell/data/inventory/kubernetes/kubernetes-1.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "ingress": { - "controllerConfigOption":"USE_EXISTING", - "supportedIngressClass":"nginx", - "publicIngressClass":"public", - "controllerChartName":"nginx", - "controllerChartArchive":"nginx-ingress.tgz", - "resourceConfigOption":"DEPLOY_FROM_CHART", - "externalServiceDomain":"nmaas.geant.net", - "publicServiceDomain":"public.nmaas.geant.net", - "tlsSupported":false, - "certificateConfigOption": "USE_LETSENCRYPT", - "issuerOrWildcardName": "nmaas-issuer", - "ingressPerDomain": false - }, - "deployment": { - "namespaceConfigOption":"USE_DEFAULT_NAMESPACE", - "defaultNamespace":"default", - "defaultStorageClass":"nmaas-nfs-storage", - "forceDedicatedWorkers":false, - "smtpServerHostname": "nmaas-postfix.nmaas-system", - "smtpServerPort": "587" - }, - "externalNetworks": [{ - "externalIp":"169.10.10.10", - "externalNetwork":"169.10.10.0", - "externalNetworkMaskLength":24, - "assigned":false - }, { - "externalIp":"169.10.20.20", - "externalNetwork":"169.10.20.0", - "externalNetworkMaskLength":24, - "assigned":false - } - ] -} diff --git a/src/test/shell/init.bat b/src/test/shell/init.bat index ecb51bcce64f4fd7bf93f76dd4036fe6291d5ac1..48cba41268c9cfe177217d2d0b6b50c12dfd426c 100644 --- a/src/test/shell/init.bat +++ b/src/test/shell/init.bat @@ -58,7 +58,7 @@ echo echo --------------------- echo echo Default mail template -curl -X POST --header "Authorization: Bearer %token%" -F "file=@data\mails\html-template\template.html;type=text/html" %API_URL%/mail/templates/html +curl -X POST %API_URL%/mail/templates/html --header "Authorization: Bearer %token%" -F "file=@data\mails\html-template\template.html;type=text/html" echo. echo echo Create mail templates diff --git a/src/test/shell/init.sh b/src/test/shell/init.sh index e7212421aa137d70e29022f0da10cd30bcede5b0..1efc051d1c8ce165ae93eabf265117eb413b6caf 100644 --- a/src/test/shell/init.sh +++ b/src/test/shell/init.sh @@ -26,7 +26,7 @@ echo curl -X GET $API_URL/domains --header "Authorization: Bearer $TOKEN" | python -m json.tool echo echo Default mail template -curl -X POST --header "Authorization: Bearer $TOKEN" -F "file=@data/mails/html-template/template.html;type=text/html" $API_URL/mail/templates/html +curl -X POST $API_URL/mail/templates/html --header "Authorization: Bearer $TOKEN" -F "file=@data/mails/html-template/template.html;type=text/html" echo echo Create mail templates curl -X POST $API_URL/mail/templates --header "Authorization: Bearer $TOKEN" --header "Content-Type: application/json" --header "Accept: application/json" -d @data/mails/activateAccountMail.json diff --git a/src/test/shell/populate-inventory.bat b/src/test/shell/populate-inventory.bat deleted file mode 100644 index ffc68e779524a5889a583ecaa7cea55a2887c030..0000000000000000000000000000000000000000 --- a/src/test/shell/populate-inventory.bat +++ /dev/null @@ -1,52 +0,0 @@ -@echo off -setlocal enableDelayedExpansion -@echo off -setlocal enableDelayedExpansion - -set API_URL=http://localhost:9000/api -echo %API_URL% - -set LF=^ - - - -for /f "delims=" %%f in ('curl -sX POST %API_URL%/auth/basic/login --header "Content-Type: application/json" --header "Accept: application/json" -d @data\login.json') do ( -REM set "LOGIN=" - if defined LOGIN set "LOGIN=!LOGIN!!LF!" - set "LOGIN=!LOGIN!%%f" -) - -rem echo Output: !LOGIN! -REM ref: http://stackoverflow.com/questions/36374496/parse-simple-json-string-in-batch -set LOGIN=%LOGIN:"=% -echo stage 1 - %LOGIN% -echo --- -set "LOGIN=%LOGIN:~1,-1%" -echo stage 2 - %LOGIN% -echo --- -set "LOGIN=%LOGIN::==%" -echo stage 3 - !LOGIN! -echo --- - -FOR /F "delims=," %%a in ("!LOGIN!") do ( - echo Found: %%a - set "%%a" - echo -- -) - -rem echo !LOGIN! - -rem set token=%LOGIN% - -echo Token: -echo ---------------------- -echo %token% -echo ---------------------- -echo Ping -curl -X GET %API_URL%/auth/basic/ping --header "Authorization: Bearer %token%" - -echo. -echo Adding default Kubernetes -curl -X POST %API_URL%/management/kubernetes --header "Authorization: Bearer %token%" --header "Content-Type: application/json" --header "Accept: application/json" -d @data\inventory\kubernetes\kubernetes-1.json -echo -curl -X GET %API_URL%/management/kubernetes --header "Authorization: Bearer %token%" diff --git a/src/test/shell/populate-inventory.sh b/src/test/shell/populate-inventory.sh deleted file mode 100644 index 3deddb387ea6328ab00b18b86557671b1d2c92ca..0000000000000000000000000000000000000000 --- a/src/test/shell/populate-inventory.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -function getToken() { - python -c "import json,sys;sys.stdout.write(json.dumps(json.load(sys.stdin)['token']))" | sed -e 's/^"//' -e 's/"$//' -} - -API_URL=http://localhost:9000/api -echo Base API URL $API_URL - -TOKEN=`curl -sX POST $API_URL/auth/basic/login --header "Content-Type: application/json" --header "Accept: application/json" -d @data/login.json | getToken` - - -echo Token: -echo ---------------------- -echo $TOKEN -echo ---------------------- -echo Ping -curl -X GET $API_URL/auth/basic/ping --header "Authorization: Bearer $TOKEN" - -echo -echo Adding default Kubernetes cluster -curl -X POST $API_URL/management/kubernetes --header "Authorization: Bearer $TOKEN" --header "Content-Type: application/json" --header "Accept: application/json" -d @data/inventory/kubernetes/kubernetes-1.json -echo -curl -X GET $API_URL/management/kubernetes --header "Authorization: Bearer $TOKEN" | python -m json.tool