Commit a78ba25
committed
Fix testMalformedToken
This test was fixed as part of elastic#49736 so that it used a
TokenService mock instance that was enabled, so that token
verification fails because the token is invalid and not because
the token service is not enabled.
When the randomly generated token we send, decodes to being of
version > 7.2 , we need to have mocked a GetResponse for the call
that TokenService#getUserTokenFromId will make, otherwise this
hangs and times out.1 parent b6d8a7e commit a78ba25
File tree
1 file changed
+3
-1
lines changed- x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc
1 file changed
+3
-1
lines changedx-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/TokenServiceTests.java
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
603 | 605 | | |
604 | 606 | | |
605 | 607 | | |
| |||
0 commit comments