Skip to content

Commit f69d96f

Browse files
committed
Refactored TEST_SUITE with free, platinum + removed old YamlRunnerTest
1 parent 3fa0b98 commit f69d96f

15 files changed

+40
-1295
lines changed

.ci/functions/imports.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require_stack_version
1818
if [[ -z $es_node_name ]]; then
1919
# only set these once
2020
set -euo pipefail
21-
export TEST_SUITE=${TEST_SUITE-oss}
21+
export TEST_SUITE=${TEST_SUITE-free}
2222
export RUNSCRIPTS=${RUNSCRIPTS-}
2323
export DETACH=${DETACH-false}
2424
export CLEANUP=${CLEANUP-false}
@@ -27,8 +27,7 @@ if [[ -z $es_node_name ]]; then
2727
export elastic_password=changeme
2828
export elasticsearch_image=elasticsearch
2929
export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200
30-
if [[ $TEST_SUITE != "xpack" ]]; then
31-
export elasticsearch_image=elasticsearch-${TEST_SUITE}
30+
if [[ $TEST_SUITE != "platinum" ]]; then
3231
export elasticsearch_url=http://${es_node_name}:9200
3332
fi
3433
export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost}

.ci/run-elasticsearch.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# to form a cluster suitable for running the REST API tests.
55
#
66
# Export the STACK_VERSION variable, eg. '8.0.0-SNAPSHOT'.
7-
# Export the TEST_SUITE variable, eg. 'oss' or 'xpack' defaults to 'oss'.
7+
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
88
# Export the NUMBER_OF_NODES variable to start more than 1 node
99

1010
# Version 1.2.0
@@ -39,7 +39,7 @@ environment=($(cat <<-END
3939
--env repositories.url.allowed_urls=http://snapshot.test*
4040
END
4141
))
42-
if [[ "$TEST_SUITE" == "xpack" ]]; then
42+
if [[ "$TEST_SUITE" == "platinum" ]]; then
4343
environment+=($(cat <<-END
4444
--env ELASTIC_PASSWORD=$elastic_password
4545
--env xpack.license.self_generated.type=trial
@@ -64,7 +64,7 @@ END
6464
fi
6565

6666
cert_validation_flags=""
67-
if [[ "$TEST_SUITE" == "xpack" ]]; then
67+
if [[ "$TEST_SUITE" == "platinum" ]]; then
6868
cert_validation_flags="--insecure --cacert /usr/share/elasticsearch/config/certs/ca.crt --resolve ${es_node_name}:443:127.0.0.1"
6969
fi
7070

.ci/test-matrix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PHP_VERSION:
1010
- 7.1-cli
1111

1212
TEST_SUITE:
13-
- oss
14-
- xpack
13+
- free
14+
- platinum
1515

1616
exclude: ~

phpunit-integration-tests.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<testsuites>
1313
<testsuite name="Integration tests">
1414
<directory>tests</directory>
15-
<exclude>tests/Elasticsearch/Tests/YamlRunnerTest.php</exclude>
1615
</testsuite>
1716
</testsuites>
1817
<groups>

phpunit-yaml-oss-tests.xml renamed to phpunit-yaml-free-tests.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
</php>
1717
<testsuites>
1818
<testsuite name="Yaml tests">
19-
<directory>tests/Elasticsearch/Tests/Yaml/Oss</directory>
19+
<directory>tests/Elasticsearch/Tests/Yaml/Free</directory>
2020
</testsuite>
2121
</testsuites>
2222
<groups>
2323
<include>
24-
<group>oss</group>
24+
<group>free</group>
2525
</include>
2626
</groups>
2727
<filter>

phpunit-yaml-xpack-tests.xml renamed to phpunit-yaml-platinum-tests.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
</php>
1717
<testsuites>
1818
<testsuite name="Yaml tests">
19-
<directory>tests/Elasticsearch/Tests/Yaml/Xpack</directory>
19+
<directory>tests/Elasticsearch/Tests/Yaml/Platinum</directory>
2020
</testsuite>
2121
</testsuites>
2222
<groups>
2323
<include>
24-
<group>xpack</group>
24+
<group>platinum</group>
2525
</include>
2626
</groups>
2727
<filter>

phpunit.xml.dist

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@
1212
<testsuites>
1313
<testsuite name="Unit tests">
1414
<directory>tests</directory>
15-
<exclude>tests/Elasticsearch/Tests/YamlRunnerTest.php</exclude>
1615
</testsuite>
1716
</testsuites>
1817
<groups>
1918
<exclude>
2019
<group>Integration</group>
21-
<group>oss</group>
22-
<group>xpack</group>
20+
<group>free</group>
21+
<group>platinum</group>
2322
</exclude>
2423
</groups>
2524
<filter>

tests/Elasticsearch/Tests/ClientIntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private function getClient(): Client
5959
->setHosts([$this->host])
6060
->setLogger($this->logger);
6161

62-
if (getenv('TEST_SUITE') === 'xpack') {
62+
if (getenv('TEST_SUITE') === 'platinum') {
6363
$client->setSSLVerification(__DIR__ . '/../../../.ci/certs/ca.crt');
6464
}
6565
return $client->build();

tests/Elasticsearch/Tests/Utility.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public static function getHost(): ?string
3535
return $url;
3636
}
3737
switch (getenv('TEST_SUITE')) {
38-
case 'oss':
38+
case 'free':
3939
return 'http://localhost:9200';
40-
case 'xpack':
40+
case 'platinum':
4141
return 'https://elastic:changeme@localhost:9200';
4242
}
4343
return null;
@@ -57,7 +57,7 @@ public static function getClient(): Client
5757
]
5858
]
5959
]);
60-
if (getenv('TEST_SUITE') === 'xpack') {
60+
if (getenv('TEST_SUITE') === 'platinum') {
6161
$clientBuilder->setSSLVerification(false);
6262
}
6363
return $clientBuilder->build();
@@ -108,21 +108,21 @@ public static function cleanUpCluster(Client $client): void
108108
*/
109109
private static function wipeCluster(Client $client): void
110110
{
111-
if (getenv('TEST_SUITE') === 'xpack') {
111+
if (getenv('TEST_SUITE') === 'platinum') {
112112
self::wipeRollupJobs($client);
113113
self::waitForPendingRollupTasks($client);
114114
self::deleteAllSLMPolicies($client);
115115
}
116116

117117
self::wipeSnapshots($client);
118118

119-
if (getenv('TEST_SUITE') === 'xpack') {
119+
if (getenv('TEST_SUITE') === 'platinum') {
120120
self::wipeDataStreams($client);
121121
}
122122

123123
self::wipeAllIndices($client);
124124

125-
if (getenv('TEST_SUITE') === 'xpack') {
125+
if (getenv('TEST_SUITE') === 'platinum') {
126126
self::wipeTemplateForXpack($client);
127127
} else {
128128
// Delete templates
@@ -141,7 +141,7 @@ private static function wipeCluster(Client $client): void
141141

142142
self::wipeClusterSettings($client);
143143

144-
if (getenv('TEST_SUITE') === 'xpack') {
144+
if (getenv('TEST_SUITE') === 'platinum') {
145145
self::deleteAllILMPolicies($client);
146146
self::deleteAllAutoFollowPatterns($client);
147147
self::deleteAllTasks($client);

0 commit comments

Comments
 (0)