Merge branch 'integ_tests' of github.com:rmuir/elasticsearch-shield into integ_tests
Conflicts: dev-tools/integration-tests.xml Original commit: elastic/x-pack-elasticsearch@caf32d7cac
This commit is contained in:
commit
c3387464c6
|
@ -37,7 +37,7 @@
|
|||
args="${integ.args} -Des.path.repo=${integ.repo.home}"/>
|
||||
|
||||
<!-- begin shield plugin mods -->
|
||||
<run-script dir="${integ.home}" script="bin/elasticsearch-shield/esusers"
|
||||
<run-script dir="${integ.home}" script="bin/shield/esusers"
|
||||
args="useradd test_user -p changeme -r admin"/>
|
||||
|
||||
<!-- seems waitfor task doesnt support basic auth?
|
||||
|
|
|
@ -31,8 +31,7 @@ import java.util.Map;
|
|||
*/
|
||||
public class ShieldPlugin extends AbstractPlugin {
|
||||
|
||||
// FIXME need to get this back to Shield once bugs fixed in core... https://github.com/elastic/elasticsearch/issues/12143
|
||||
public static final String NAME = "elasticsearch-shield";
|
||||
public static final String NAME = "shield";
|
||||
|
||||
public static final String ENABLED_SETTING_NAME = NAME + ".enabled";
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ package org.elasticsearch.shield.test;
|
|||
|
||||
import org.elasticsearch.ElasticsearchSecurityException;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
import org.elasticsearch.shield.ShieldPlugin;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
@ -17,6 +18,6 @@ public class ShieldAssertions {
|
|||
assertThat(e.status(), is(RestStatus.UNAUTHORIZED));
|
||||
assertThat(e.getHeaderKeys(), hasSize(1));
|
||||
assertThat(e.getHeader("WWW-Authenticate"), notNullValue());
|
||||
assertThat(e.getHeader("WWW-Authenticate"), contains("Basic realm=\"elasticsearch-shield\""));
|
||||
assertThat(e.getHeader("WWW-Authenticate"), contains("Basic realm=\"" + ShieldPlugin.NAME + "\""));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue