Marvel: Do not collect data in SecuredClientTests

closes elastic/elasticsearch#1242

Original commit: elastic/x-pack-elasticsearch@cd8f8ce2fa
This commit is contained in:
Tanguy Leroux 2016-01-07 11:58:36 +01:00
parent 75ab4f9470
commit cdb3869b1b
2 changed files with 12 additions and 1 deletions

View File

@ -250,7 +250,7 @@ public class LocalExporter extends Exporter implements ClusterStateListener, Cle
cleanerService.validateRetention(exporterRetention);
retention = exporterRetention;
} catch (IllegalArgumentException e) {
logger.warn("http exporter [{}] - unable to use custom history duration [{}]: {}", name(), exporterRetention, e.getMessage());
logger.warn("local exporter [{}] - unable to use custom history duration [{}]: {}", name(), exporterRetention, e.getMessage());
}
}

View File

@ -7,10 +7,12 @@ package org.elasticsearch.marvel.shield;
import org.elasticsearch.ElasticsearchSecurityException;
import org.elasticsearch.action.ActionRequestBuilder;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.marvel.agent.exporter.MarvelTemplateUtils;
import org.elasticsearch.marvel.agent.settings.MarvelSettings;
import org.elasticsearch.marvel.test.MarvelIntegTestCase;
import org.elasticsearch.node.Node;
import org.elasticsearch.rest.RestStatus;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
@ -18,6 +20,15 @@ import static org.hamcrest.Matchers.is;
public class SecuredClientTests extends MarvelIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(Node.HTTP_ENABLED, false)
.put(MarvelSettings.INTERVAL_SETTING.getKey(), "-1")
.build();
}
public void testAllowedAccess() {
SecuredClient securedClient = internalCluster().getInstance(SecuredClient.class);