File tree Expand file tree Collapse file tree 20 files changed +1498
-1211
lines changed
tests/Elasticsearch/Tests Expand file tree Collapse file tree 20 files changed +1498
-1211
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ require_stack_version
18
18
if [[ -z $es_node_name ]]; then
19
19
# only set these once
20
20
set -euo pipefail
21
- export TEST_SUITE=${TEST_SUITE-oss }
21
+ export TEST_SUITE=${TEST_SUITE-free }
22
22
export RUNSCRIPTS=${RUNSCRIPTS-}
23
23
export DETACH=${DETACH-false}
24
24
export CLEANUP=${CLEANUP-false}
@@ -27,8 +27,7 @@ if [[ -z $es_node_name ]]; then
27
27
export elastic_password=changeme
28
28
export elasticsearch_image=elasticsearch
29
29
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
32
31
export elasticsearch_url=http://${es_node_name} :9200
33
32
fi
34
33
export external_elasticsearch_url=${elasticsearch_url/ $es_node_name / localhost}
Original file line number Diff line number Diff line change 4
4
# to form a cluster suitable for running the REST API tests.
5
5
#
6
6
# 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 '.
8
8
# Export the NUMBER_OF_NODES variable to start more than 1 node
9
9
10
10
# Version 1.2.0
@@ -39,7 +39,7 @@ environment=($(cat <<-END
39
39
--env repositories.url.allowed_urls=http://snapshot.test*
40
40
END
41
41
) )
42
- if [[ " $TEST_SUITE " == " xpack " ]]; then
42
+ if [[ " $TEST_SUITE " == " platinum " ]]; then
43
43
environment+=($( cat << -END
44
44
--env ELASTIC_PASSWORD=$elastic_password
45
45
--env xpack.license.self_generated.type=trial
64
64
fi
65
65
66
66
cert_validation_flags=" "
67
- if [[ " $TEST_SUITE " == " xpack " ]]; then
67
+ if [[ " $TEST_SUITE " == " platinum " ]]; then
68
68
cert_validation_flags=" --insecure --cacert /usr/share/elasticsearch/config/certs/ca.crt --resolve ${es_node_name} :443:127.0.0.1"
69
69
fi
70
70
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ PHP_VERSION:
9
9
- 7.1-cli
10
10
11
11
TEST_SUITE :
12
- - oss
12
+ - free
13
+ - platinum
13
14
14
15
exclude : ~
Original file line number Diff line number Diff line change @@ -23,15 +23,23 @@ generator/*
23
23
# Elasticsearch related
24
24
util /elasticsearch /
25
25
util /cache /
26
+ util /* .zip
27
+ util /output /
26
28
27
- # Sami docs generator
28
- /sami .phar
29
+ # Doctum docs generator
30
+ /doctum .phar
29
31
30
32
# PHPUnit
31
33
/phpunit.xml
34
+ .phpunit.result.cache
32
35
33
36
# Code coverage
34
37
build
38
+ # Do not ignore Doctum docs built files
39
+ ! /docs /build
35
40
36
41
# Junit test output
37
42
tests /* -junit.xml
43
+
44
+ # YAML tests
45
+ tests /Elasticsearch /Tests /Yaml
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ function php_cs() {
10
10
->exclude ('travis ' )
11
11
->exclude ('util/cache ' )
12
12
->exclude ('util/elasticsearch ' )
13
+ ->exclude ('tests/Elasticsearch/Tests/Yaml ' )
13
14
->exclude ('vendor ' )
14
15
->in (__DIR__ );
15
16
Original file line number Diff line number Diff line change 13
13
}
14
14
],
15
15
"require" : {
16
- "php" : " ^7.1" ,
16
+ "php" : " ^7.1 || ^8.0 " ,
17
17
"ext-json" : " >=1.3.7" ,
18
18
"ezimuel/ringphp" : " ^1.1.2" ,
19
19
"psr/log" : " ~1.0"
20
20
},
21
21
"require-dev" : {
22
- "cpliakas/git-wrapper" : " ~2.0" ,
22
+ "ext-yaml" : " *" ,
23
+ "ext-zip" : " *" ,
24
+ "cpliakas/git-wrapper" : " ~2.0 || ~3.0" ,
23
25
"doctrine/inflector" : " ^1.3" ,
24
26
"mockery/mockery" : " ^1.2" ,
25
27
"phpstan/phpstan" : " ^0.12" ,
26
- "phpunit/phpunit" : " ^7.5" ,
28
+ "phpunit/phpunit" : " ^7.5 || ^8.5 || ^9.3 " ,
27
29
"squizlabs/php_codesniffer" : " ^3.4" ,
28
30
"symfony/finder" : " ~4.0" ,
29
31
"symfony/yaml" : " ~4.0"
53
55
"scripts" : {
54
56
"phpcs" : [
55
57
" phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp src" ,
56
- " phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp tests"
58
+ " phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp tests --ignore=tests/Elasticsearch/Tests/Yaml "
57
59
],
58
60
"phpstan" : [
59
61
" phpstan analyse src --level 2 --no-progress"
Original file line number Diff line number Diff line change 11
11
<testsuites >
12
12
<testsuite name =" Integration tests" >
13
13
<directory >tests</directory >
14
- <exclude >tests/Elasticsearch/Tests/YamlRunnerTest.php</exclude >
15
14
</testsuite >
16
15
</testsuites >
17
16
<groups >
Original file line number Diff line number Diff line change 14
14
<ini name =" error_reporting" value =" 16383" />
15
15
</php >
16
16
<testsuites >
17
- <testsuite name =" Integration Tests " >
18
- <file >tests/Elasticsearch/Tests/YamlRunnerTest.php</ file >
17
+ <testsuite name =" Yaml tests " >
18
+ <directory >tests/Elasticsearch/Tests/Yaml/Platinum</ directory >
19
19
</testsuite >
20
20
</testsuites >
21
+ <groups >
22
+ <include >
23
+ <group >platinum</group >
24
+ </include >
25
+ </groups >
21
26
<filter >
22
27
<whitelist >
23
28
<directory suffix =" .php" >src</directory >
Original file line number Diff line number Diff line change
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
+ >
11
+ <php >
12
+ <!-- Disable E_USER_DEPRECATED setting E_ALL & ~E_USER_DEPRECATED-->
13
+ <ini name =" error_reporting" value =" 16383" />
14
+ </php >
15
+ <testsuites >
16
+ <testsuite name =" Yaml tests" >
17
+ <directory >tests/Elasticsearch/Tests/Yaml/Free</directory >
18
+ </testsuite >
19
+ </testsuites >
20
+ <groups >
21
+ <include >
22
+ <group >free</group >
23
+ </include >
24
+ </groups >
25
+ <filter >
26
+ <whitelist >
27
+ <directory suffix =" .php" >src</directory >
28
+ </whitelist >
29
+ </filter >
30
+ <logging >
31
+ <log type =" junit" target =" tests/yaml-test-junit.xml" />
32
+ </logging >
33
+ </phpunit >
Original file line number Diff line number Diff line change
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
+ >
11
+ <php >
12
+ <env name =" ES_TEST_HOST" value =" http://localhost:9200" />
13
+ <!-- Disable E_USER_DEPRECATED setting E_ALL & ~E_USER_DEPRECATED-->
14
+ <ini name =" error_reporting" value =" 16383" />
15
+ </php >
16
+ <testsuites >
17
+ <testsuite name =" Yaml tests" >
18
+ <directory >tests/Elasticsearch/Tests/Yaml/Platinum</directory >
19
+ </testsuite >
20
+ </testsuites >
21
+ <groups >
22
+ <include >
23
+ <group >platinum</group >
24
+ </include >
25
+ </groups >
26
+ <filter >
27
+ <whitelist >
28
+ <directory suffix =" .php" >src</directory >
29
+ </whitelist >
30
+ </filter >
31
+ <logging >
32
+ <log type =" junit" target =" tests/yaml-test-junit.xml" />
33
+ </logging >
34
+ </phpunit >
Original file line number Diff line number Diff line change 14
14
</php >
15
15
<testsuites >
16
16
<testsuite name =" Yaml tests" >
17
- <file >tests/Elasticsearch/Tests/YamlRunnerTest.php</ file >
17
+ <directory >tests/Elasticsearch/Tests/Yaml/Free</ directory >
18
18
</testsuite >
19
19
</testsuites >
20
20
<groups >
21
21
<include >
22
- <group >sync </group >
22
+ <group >free </group >
23
23
</include >
24
24
</groups >
25
25
<filter >
Original file line number Diff line number Diff line change 11
11
<testsuites >
12
12
<testsuite name =" Unit tests" >
13
13
<directory >tests</directory >
14
- <exclude >tests/Elasticsearch/Tests/YamlRunnerTest.php</exclude >
15
14
</testsuite >
16
15
</testsuites >
17
16
<groups >
18
17
<exclude >
19
18
<group >Integration</group >
19
+ <group >free</group >
20
+ <group >platinum</group >
20
21
</exclude >
21
22
</groups >
22
23
<filter >
Original file line number Diff line number Diff line change @@ -58,8 +58,8 @@ private function getClient(): Client
58
58
$ client = ClientBuilder::create ()
59
59
->setHosts ([$ this ->host ])
60
60
->setLogger ($ this ->logger );
61
-
62
- if (getenv ('TEST_SUITE ' ) === 'xpack ' ) {
61
+
62
+ if (getenv ('TEST_SUITE ' ) === 'platinum ' ) {
63
63
$ client ->setSSLVerification (__DIR__ . '/../../../.ci/certs/ca.crt ' );
64
64
}
65
65
return $ client ->build ();
You can’t perform that action at this time.
0 commit comments