Skip to content
Permalink
f44edf51f2
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
26 lines (20 sloc) 696 Bytes
#!/usr/bin/env bats
load ../common
# These tests assume the pipeline will start and stop the container.
@test "Leaves running process" {
result="$(docker ps | grep $imagename)"
[ "$result" != '' ]
}
@test "Exposes running Tomcat service" {
result="$(docker exec -i $imagename curl http://localhost:8080/)"
[ "$result" != '' ]
}
@test "Service is Shibboleth" {
docker exec -i $imagename curl -silent http://localhost:8080/ | grep 'Shibboleth'
}
@test "Shibboleth status URL is available" {
run docker exec -i $imagename curl -o /dev/null --silent --head --write-out '%{http_code}\n' http://localhost:8080/status
echo ${output}
[ "$status" -eq 0 ]
[ ${output} == *"200"* ]
}