Skip to content

Commit 1abff92

Browse files
committed
Changed TEST_SUITE with free and platinum
1 parent 55f033e commit 1abff92

File tree

13 files changed

+103
-39
lines changed

13 files changed

+103
-39
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
STACK_VERSION:
3-
- 7.11.0-SNAPSHOT
3+
- 7.11.0
44

55
PHP_VERSION:
66
- 8.0-cli
@@ -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: ~

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
run: |
5959
vendor/bin/phpunit -c phpunit.xml.dist
6060
env:
61-
TEST_SUITE: oss
61+
TEST_SUITE: free
6262

6363
- name: Configure sysctl limits
6464
run: |
@@ -76,4 +76,4 @@ jobs:
7676
run: |
7777
vendor/bin/phpunit -c phpunit-integration-tests.xml
7878
env:
79-
TEST_SUITE: oss
79+
TEST_SUITE: free

phpunit-yaml-free-tests.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.3/phpunit.xsd"
4+
bootstrap="tests/bootstrap.php"
5+
colors="true"
6+
failOnRisky="true"
7+
verbose="true"
8+
beStrictAboutChangesToGlobalState="true"
9+
beStrictAboutOutputDuringTests="true"
10+
beStrictAboutTestsThatDoNotTestAnything="false"
11+
>
12+
<php>
13+
<!-- Disable E_USER_DEPRECATED setting E_ALL & ~E_USER_DEPRECATED-->
14+
<ini name="error_reporting" value="16383"/>
15+
<ini name="memory_limit" value="-1" />
16+
</php>
17+
<testsuites>
18+
<testsuite name="Yaml tests">
19+
<directory>tests/Elasticsearch/Tests/Yaml/Free</directory>
20+
</testsuite>
21+
</testsuites>
22+
<groups>
23+
<include>
24+
<group>free</group>
25+
</include>
26+
</groups>
27+
<filter>
28+
<whitelist>
29+
<directory suffix=".php">src</directory>
30+
</whitelist>
31+
</filter>
32+
<logging>
33+
<log type="junit" target="tests/yaml-test-junit.xml"/>
34+
</logging>
35+
</phpunit>

phpunit-yaml-platinum-tests.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.3/phpunit.xsd"
4+
bootstrap="tests/bootstrap.php"
5+
colors="true"
6+
failOnRisky="true"
7+
verbose="true"
8+
beStrictAboutChangesToGlobalState="true"
9+
beStrictAboutOutputDuringTests="true"
10+
beStrictAboutTestsThatDoNotTestAnything="false"
11+
>
12+
<php>
13+
<!-- Disable E_USER_DEPRECATED setting E_ALL & ~E_USER_DEPRECATED-->
14+
<ini name="error_reporting" value="16383"/>
15+
<ini name="memory_limit" value="-1" />
16+
</php>
17+
<testsuites>
18+
<testsuite name="Yaml tests">
19+
<directory>tests/Elasticsearch/Tests/Yaml/Platinum</directory>
20+
</testsuite>
21+
</testsuites>
22+
<groups>
23+
<include>
24+
<group>platinum</group>
25+
</include>
26+
</groups>
27+
<filter>
28+
<whitelist>
29+
<directory suffix=".php">src</directory>
30+
</whitelist>
31+
</filter>
32+
<logging>
33+
<log type="junit" target="tests/yaml-test-junit.xml"/>
34+
</logging>
35+
</phpunit>

phpunit.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<groups>
1919
<exclude>
2020
<group>Integration</group>
21-
<group>oss</group>
22-
<group>xpack</group>
21+
<group>free</group>
22+
<group>platinum</group>
2323
</exclude>
2424
</groups>
2525
<filter>

tests/Elasticsearch/Tests/Utility.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public static function getHost(): ?string
3434
return $url;
3535
}
3636
switch (getenv('TEST_SUITE')) {
37-
case 'oss':
37+
case 'free':
3838
return 'http://localhost:9200';
39-
case 'xpack':
39+
case 'platinum':
4040
return 'https://elastic:changeme@localhost:9200';
4141
}
4242
return null;

util/ActionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,15 @@ private function skip(array $actions)
328328
}
329329
switch ($feature) {
330330
case 'xpack':
331-
if (YamlTests::$testSuite !== 'xpack') {
331+
if (YamlTests::$testSuite !== 'platinum') {
332332
$this->skippedTest = true;
333333
return YamlTests::render(self::TEMPLATE_SKIP_XPACK, [
334334
':testname' => "__CLASS__ . '::' . __FUNCTION__"
335335
]);
336336
}
337337
break;
338338
case 'no_xpack':
339-
if (YamlTests::$testSuite !== 'oss') {
339+
if (YamlTests::$testSuite !== 'free') {
340340
$this->skippedTest = true;
341341
return YamlTests::render(self::TEMPLATE_SKIP_OSS, [
342342
':testname' => "__CLASS__ . '::' . __FUNCTION__"

util/YamlTests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function build(): array
186186

187187
$skippedTest = sprintf("%s\\%s::%s", $namespace, $testName, $functionName);
188188
$skippedAllTest = sprintf("%s\\%s::*", $namespace, $testName);
189-
$skip = strtolower(self::$testSuite) === 'oss'
189+
$skip = strtolower(self::$testSuite) === 'free'
190190
? self::SKIPPED_TEST_OSS
191191
: self::SKIPPED_TEST_XPACK;
192192
if (isset($skip[$skippedAllTest])) {
@@ -232,7 +232,7 @@ public function build(): array
232232
);
233233
} else {
234234
$test = self::render(
235-
strtolower(self::$testSuite) === 'oss'
235+
strtolower(self::$testSuite) === 'free'
236236
? self::TEMPLATE_UNIT_TEST_OSS
237237
: self::TEMPLATE_UNIT_TEST_XPACK,
238238
[

0 commit comments

Comments
 (0)