Skip to content

Commit 3a5f632

Browse files
committed
Add check to invitedOIDCUserVerified
would have helped to identify an issue
1 parent dde92e2 commit 3a5f632

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

scripts/start_docker_database.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ main() {
1919
echo "Using docker image: ${DOCKER_IMAGE}, DB=${DB}, PROFILE_NAME=${PROFILE_NAME}"
2020
echo
2121

22-
echo "To test against this ${PROFILE_NAME} database run with profile:"
23-
echo " docker exec -it $(docker ps | grep ${DOCKER_IMAGE} | tail -n 1 | awk '{print $1}') bash"
24-
echo " ./gradlew -Dspring.profiles.active=${PROFILE_NAME} test"
25-
echo " ./gradlew -Dspring.profiles.active=${PROFILE_NAME} integrationTest"
26-
echo
22+
echo "
23+
To test against this ${PROFILE_NAME} database run with profile:
24+
docker exec -it \$(docker ps | grep ${DOCKER_IMAGE} | tail -n 1 | awk '{print \$1}') bash
25+
cd ${container_script_dir}
26+
rm /root/.gradle/gradle.properties
27+
./gradlew bootRun --debug-jvm -Dspring.profiles.active=${PROFILE_NAME} -Djava.security.egd=file:/dev/./urandom --stacktrace --console=plain
28+
./gradlew -Dspring.profiles.active=${PROFILE_NAME} test
29+
./gradlew -Dspring.profiles.active=${PROFILE_NAME} integrationTest
30+
To stop:
31+
docker stop \$(docker ps | grep 8.4 | tail -n 1 | awk '{print \$1}')
32+
"
2733

2834
docker pull "${DOCKER_IMAGE}"
2935
docker run \
@@ -36,6 +42,8 @@ main() {
3642
--volume "${gradle_lock_dir}" \
3743
--env DB="${DB}" \
3844
--publish "${db_port}:${db_port}" \
45+
#--publish "5005:5005" \
46+
#--publish "8080:8080" \
3947
"${DOCKER_IMAGE}"
4048
}
4149

uaa/src/test/java/org/cloudfoundry/identity/uaa/integration/feature/InvitationsIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ void invitedOIDCUserVerified() throws Exception {
311311
webDriver.findElement(By.name("username")).sendKeys("marissa");
312312
webDriver.findElement(By.name("password")).sendKeys("koala");
313313
webDriver.clickAndWait(By.xpath("//input[@value='Sign in']"));
314+
// redirected to /app, which is not there
315+
assertThat(webDriver.getPageSource()).contains("Not Found");
314316

315317
ScimUser user = IntegrationTestUtils.getUser(scimToken, baseUrl, userId);
316318
assertThat(user.isVerified()).isTrue();

0 commit comments

Comments
 (0)