Skip to content

Commit

Permalink
Add basic Shibboleth tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Sep 28, 2018
1 parent 33aaa54 commit 27acbc6
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pipeline {
try {
sh 'bin/test.sh 2>&1 | tee debug'
sh '(cd demo/simple ; bats tests ) 2>&1 | tee -a debug'
sh '(cd demo/shibboleth ; bats tests ) 2>&1 | tee -a debug'
// sh 'echo Test output ; cat debug'
} catch (error) {
def error_details = readFile('./debug')
Expand Down
3 changes: 3 additions & 0 deletions demo/shibboleth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This container composition is to be used outside other midPoint compositions like `demo/simple` or `demo/postgresql-full`.

Just start it along with the other midPoint composition. They should work together seamlessly.
31 changes: 31 additions & 0 deletions demo/shibboleth/tests/main.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bats

load ../../../common
load ../../../library

@test "000 Cleanup before running the tests" {
cd ../simple ; docker-compose down -v ; true
run docker-compose down -v
}

@test "010 Initialize and start midPoint" {
cd ../simple ; docker-compose up -d
wait_for_midpoint_start simple_midpoint-server_1
}

@test "020 Initialize and start Shibboleth" {
docker-compose up -d
# TODO implement wait_for_shibboleth_start
sleep 20
}

@test "030 Check health" {
check_health
}

# TODO check that e.g. accessing some URLs results in shibboleth redirection (check login page, some REST calls etc)

@test "999 Clean up" {
cd ../simple ; docker-compose down -v ; true
run docker-compose down -v
}
5 changes: 4 additions & 1 deletion demo/simple/tests/main.bats
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
load ../../../common
load ../../../library

@test "000 Initialize and start midPoint" {
@test "000 Cleanup before running the tests" {
run docker-compose down -v
}

@test "010 Initialize and start midPoint" {
docker-compose up -d
wait_for_midpoint_start simple_midpoint-server_1
}
Expand Down

0 comments on commit 27acbc6

Please sign in to comment.