Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration tests for Elasticsearch 8 #3037

Merged
merged 1 commit into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
import java.util.Base64;

/**
* Test Elasticsearch backend with API key authentication.
* Base class for testing Elasticsearch backend with API key authentication.
*
* @author Tommy Ludwig
* @author Johnny Lim
*/
class ElasticsearchApiKeyIntegrationTest extends ElasticsearchMeterRegistryElasticsearch7IntegrationTest {
abstract class AbstractElasticsearchApiKeyIntegrationTest extends AbstractElasticsearchMeterRegistryIntegrationTest {

@Override
protected ElasticConfig getConfig() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
@Tag("docker")
abstract class AbstractElasticsearchMeterRegistryIntegrationTest {

protected static final String VERSION_7 = "7.17.0";
protected static final String VERSION_8 = "8.0.0";

protected static final String USER = "elastic";
protected static final String PASSWORD = "changeme";

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2022 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.micrometer.elastic;

/**
* Integration tests with API key authentication for Elasticsearch 7.
*
* @author Johnny Lim
*/
class Elasticsearch7ApiKeyIntegrationTest extends AbstractElasticsearchApiKeyIntegrationTest {

@Override
protected String getVersion() {
return VERSION_7;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2022 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.micrometer.elastic;

/**
* Integration tests with API key authentication for Elasticsearch 8.
*
* @author Johnny Lim
*/
class Elasticsearch8ApiKeyIntegrationTest extends AbstractElasticsearchApiKeyIntegrationTest {

@Override
protected String getVersion() {
return VERSION_8;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ElasticsearchMeterRegistryElasticsearch7IntegrationTest

@Override
protected String getVersion() {
return "7.16.3";
return VERSION_7;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright 2022 VMware, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.micrometer.elastic;

/**
* Integration tests on {@link ElasticMeterRegistry} for Elasticsearch 8.
*
* @author Johnny Lim
*/
class ElasticsearchMeterRegistryElasticsearch8IntegrationTest
extends AbstractElasticsearchMeterRegistryIntegrationTest {

@Override
protected String getVersion() {
return VERSION_8;
}

}