fix: address test failure by using the previous log (#27172)
closes: #26790 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
parent
52fe8b0feb
commit
7ea595d27b
1 changed files with 5 additions and 2 deletions
|
@ -89,8 +89,11 @@ public class WatchedSecretsTest extends BaseOperatorTest {
|
||||||
k8sclient.resource(dbSecret).update();
|
k8sclient.resource(dbSecret).update();
|
||||||
|
|
||||||
// dynamically check pod 0 to avoid race conditions
|
// dynamically check pod 0 to avoid race conditions
|
||||||
Awaitility.await().atMost(1, TimeUnit.MINUTES).ignoreExceptions().until(() ->
|
Awaitility.await().atMost(1, TimeUnit.MINUTES).ignoreExceptions()
|
||||||
k8sclient.pods().withName(kc.getMetadata().getName() + "-0").getLog().contains("password authentication failed for user \"" + username + "\""));
|
.until(() -> k8sclient
|
||||||
|
.raw(String.format("/api/v1/namespaces/%s/pods/%s/log?previous=true", namespace,
|
||||||
|
kc.getMetadata().getName() + "-0"))
|
||||||
|
.contains("password authentication failed for user \"" + username + "\""));
|
||||||
}
|
}
|
||||||
|
|
||||||
private StatefulSet getStatefulSet(Keycloak kc) {
|
private StatefulSet getStatefulSet(Keycloak kc) {
|
||||||
|
|
Loading…
Reference in a new issue