tests: Can't access management area without password

This commit is contained in:
Sameer Naik
2015-08-13 21:33:01 +05:30
parent 263481a2e7
commit 1d02956986

View File

@@ -41,3 +41,9 @@ create_container(){
run docker run --link $CONTAINER_NAME:tomcat --rm $IMAGE_NAME curl -L -i http://$TOMCAT_USER:$TOMCAT_PASSWORD@tomcat:8080/manager/html
[[ "$output" =~ '200 OK' ]]
}
@test "Can't access management area without password" {
create_container -d -e TOMCAT_PASSWORD=$TOMCAT_PASSWORD
run docker run --link $CONTAINER_NAME:tomcat --rm $IMAGE_NAME curl -L -i http://$TOMCAT_USER@tomcat:8080/manager/html
[[ "$output" =~ '401 Unauthorized' ]]
}