From 5da67786e258ea8fe1862b62249e1460cc901b43 Mon Sep 17 00:00:00 2001 From: "Thierno IB. BARRY" Date: Tue, 27 Sep 2016 16:59:20 +0200 Subject: [PATCH] use include_vars to include license during tests --- tasks/xpack/elasticsearch-xpack-activation.yml | 6 +++--- test/integration/xpack.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/xpack/elasticsearch-xpack-activation.yml b/tasks/xpack/elasticsearch-xpack-activation.yml index 6da5595..7010a5b 100644 --- a/tasks/xpack/elasticsearch-xpack-activation.yml +++ b/tasks/xpack/elasticsearch-xpack-activation.yml @@ -1,4 +1,4 @@ - +--- - name: Activate ES license (without shield authentication) uri: method: PUT @@ -11,7 +11,7 @@ when: '"shield" not in es_xpack_features failed_when: > license_activated.status != 200 or - license_activated.json.license_status is not defined or + license_activated.json.license_status is not defined or license_activated.json.license_status != 'valid' - name: Activate ES license (with shield authentication) @@ -29,7 +29,7 @@ when: '"shield" in es_xpack_features failed_when: > license_activated.status != 200 or - license_activated.json.license_status is not defined or + license_activated.json.license_status is not defined or license_activated.json.license_status != 'valid' - debug: diff --git a/test/integration/xpack.yml b/test/integration/xpack.yml index 2f0d9b3..2e46e30 100644 --- a/test/integration/xpack.yml +++ b/test/integration/xpack.yml @@ -5,10 +5,10 @@ - { role: elasticsearch, es_config: { "http.port": 9200, "transport.tcp.port":9300, discovery.zen.ping.unicast.hosts: "localhost:9300", "shield.authc.realms.file1.type": "file","shield.authc.realms.file1.order": 0, "shield.authc.realms.native1.type": "native","shield.authc.realms.native1.order": 1 }, es_instance_name: "shield_node" } + include_vars: <%= ENV['ES_XPACK_LICENSE_FILE'] %> vars: es_templates: true es_enable_xpack: true - es_xpack_license: <%= ENV['ES_XPACK_LICENSE'] %> es_plugins: - plugin: lmenezes/elasticsearch-kopf version: master