Skip to content

Commit

Permalink
Add some demo/shibboleth tests
Browse files Browse the repository at this point in the history
(related to internal authentication)
  • Loading branch information
mederly committed Oct 3, 2018
1 parent ceed5ac commit 54f02b6
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion demo/shibboleth/tests/main.bats
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ load ../../../library
}

@test "010 Initialize and start containers" {
env docker-compose up -d
docker-compose up -d
}

@test "012 Wait for Shibboleth to start up" {
Expand Down Expand Up @@ -50,6 +50,31 @@ load ../../../library
[ "$status" -eq 200 ]
}

@test "100 Check internally-authenticated REST call: get 'administrator'" {
check_health
get_and_check_object users 00000000-0000-0000-0000-000000000002 administrator
}

@test "200 Shut down" {
docker-compose down
}

@test "210 Start with internal authentication" {
env AUTHENTICATION=internal docker-compose up -d
}

@test "210 Wait for midPoint to start up" {
wait_for_midpoint_start shibboleth_midpoint_server_1
}

@test "220 Check health" {
check_health
}

@test "230 Check internal login redirection" {
curl -k --write-out %{redirect_url} --silent --output /dev/null https://localhost:8443/midpoint/self/dashboard | grep 'https:\/\/localhost:8443\/midpoint\/login'
}

@test "999 Clean up" {
docker-compose down -v
}

0 comments on commit 54f02b6

Please sign in to comment.