From f0f4e0428dc9c1f4c095f2cec5c77ed151faa28c Mon Sep 17 00:00:00 2001 From: Hynek Mlnarik Date: Tue, 2 Apr 2019 22:32:39 +0200 Subject: [PATCH] KEYCLOAK-9982 Fix broken link --- .travis.yml | 2 +- server_installation/topics/operating-mode/crossdc.adoc | 2 +- .../java/org/keycloak/documentation/test/utils/LinkUtils.java | 4 ++++ tests/src/test/resources/ignored-link-redirects | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0a6938126e..56be321bad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,4 @@ install: - echo "travis_fold:end:install folding ends" script: - - mvn test -f tests/pom.xml -D$PROFILE -B + - mvn test -f tests/pom.xml -D$PROFILE -B -fae diff --git a/server_installation/topics/operating-mode/crossdc.adoc b/server_installation/topics/operating-mode/crossdc.adoc index 9ac097d524..42b899b1e1 100644 --- a/server_installation/topics/operating-mode/crossdc.adoc +++ b/server_installation/topics/operating-mode/crossdc.adoc @@ -671,7 +671,7 @@ A bidirectional state transfer will ensure that entities which were created *aft Unfortunately, there is no any universal solution to this. Split-brains and network outages are just state, which is usually impossible to be handled 100% correctly with 100% consistent data between sites. In the case of {project_name}, it typically is not a critical issue. In the worst case, users will need to re-login again to their clients, or have the improper count of loginFailures tracked for brute force protection. See the {jdgserver_name}/JGroups documentation for more tips how to deal with split-brain. The state transfer can be also done on the {jdgserver_name} server side through JMX. The operation name is `pushState`. There are few other operations to monitor status, cancel push state, and so on. -More info about state transfer is available in the link:{jdgserver_crossdcdocs_link}#state_transfer_between_sites[{jdgserver_name} docs]. +More info about state transfer is available in the link:{jdgserver_crossdcdocs_link}#pushing_state_transfer_to_sites[{jdgserver_name} docs]. [[clearcache]] diff --git a/tests/src/test/java/org/keycloak/documentation/test/utils/LinkUtils.java b/tests/src/test/java/org/keycloak/documentation/test/utils/LinkUtils.java index 4a8cb1511d..a40b7a85f9 100644 --- a/tests/src/test/java/org/keycloak/documentation/test/utils/LinkUtils.java +++ b/tests/src/test/java/org/keycloak/documentation/test/utils/LinkUtils.java @@ -150,6 +150,8 @@ public class LinkUtils { for (String ignored : ignoredLinks) { if (ignored.endsWith("*") && link.startsWith(ignored.substring(0, ignored.length() - 1))) { return false; + } else if (ignored.startsWith("REGEX:") && link.matches(ignored.substring(6))) { + return true; } else if (ignored.equals(link)) { return false; } @@ -172,6 +174,8 @@ public class LinkUtils { for (String valid : ignoredLinkRedirects) { if (valid.endsWith("*") && location.startsWith(valid.substring(0, valid.length() - 1))) { return true; + } else if (valid.startsWith("REGEX:") && location.matches(valid.substring(6))) { + return true; } else if (valid.equals(location)) { return true; } diff --git a/tests/src/test/resources/ignored-link-redirects b/tests/src/test/resources/ignored-link-redirects index 4a266cd410..9db578eb68 100644 --- a/tests/src/test/resources/ignored-link-redirects +++ b/tests/src/test/resources/ignored-link-redirects @@ -11,4 +11,5 @@ https://nodejs.org/en/ http://docs.openshift.com/container-platform/* https://access.redhat.com/documentation/en/red-hat-jboss-middleware-for-openshift/3/single/openshift-primer/ https://access.redhat.com/login?redirectTo=https://access.redhat.com/terms-based-registry -https://sso.redhat.com/auth/* \ No newline at end of file +https://sso.redhat.com/auth/* +REGEX:https://access.redhat.com/documentation/.*/index