Test: fix security rolling upgrade tests that were failing

This commit fixes the default password migration tests that had been failing reproducibly. The
first fix skips tests using the set enabled api when running against a version prior to 5.1.2 as
this api would otherwise trip an assertion that the xcontent builder was not closed. The second
fix is to ensure we set the password field in the user object.

relates elastic/x-pack-elasticsearch#1529
relates elastic/x-pack-elasticsearch#1516

Original commit: elastic/x-pack-elasticsearch@2f9c804309
This commit is contained in:
jaymode 2017-06-13 07:34:29 -06:00
parent 863755d2da
commit ee3d17adfd
3 changed files with 6 additions and 5 deletions

View File

@ -32,8 +32,8 @@
---
"verify users for default password migration in mixed cluster":
- skip:
version: "5.0.0 - "
reason: https://github.com/elastic/x-pack-elasticsearch/issues/1516
version: " - 5.1.1"
reason: "the rest enabled action used by the old cluster test trips an assertion. see https://github.com/elastic/x-pack/pull/4443"
- do:
xpack.security.get_user:
username: "kibana,logstash_system"

View File

@ -28,7 +28,8 @@ teardown:
body: >
{
"doc": {
"enabled": false
"enabled": false,
"password": ""
}
}
- do:

View File

@ -26,8 +26,8 @@
---
"Verify default password migration results in upgraded cluster":
- skip:
version: "5.0.0 - "
reason: https://github.com/elastic/x-pack-elasticsearch/issues/1529
version: " - 5.1.1"
reason: "the rest enabled action used by the old cluster test trips an assertion. see https://github.com/elastic/x-pack/pull/4443"
- do:
headers:
Authorization: "Basic bmF0aXZlX3VzZXI6Y2hhbmdlbWU="