Skip to content

Commit 68e819b

Browse files
joelwurtzpolyfractal
authored andcommitted
Split, refactor and fix some tests (#447)
* Separate integration tests and refactor the YamlRunnerTest class * Fix some tests on elasticsearch 5.0 * Fix typo * Revert pipeline, add local skipping list, support features and add endpoint mapping
1 parent d47b35e commit 68e819b

File tree

10 files changed

+606
-614
lines changed

10 files changed

+606
-614
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ before_script:
4444

4545
script:
4646
- vendor/bin/phpunit $PHPUNIT_FLAGS
47+
- vendor/bin/phpunit -c phpunit-integration.xml $PHPUNIT_FLAGS
4748

4849
after_script:
4950
- if [ $TRAVIS_PHP_VERSION = '7.0' ]; then php vendor/bin/coveralls; fi

composer.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
"require-dev": {
1818
"phpunit/phpunit": "~4.7",
1919
"mockery/mockery": "0.9.4",
20-
"symfony/yaml": "2.4.3 as 2.4.2",
20+
"symfony/yaml": "^2.8",
21+
"symfony/finder": "^2.8",
2122
"cpliakas/git-wrapper": "~1.0",
22-
"sami/sami": "~3.2"
23+
"sami/sami": "~3.2",
24+
"doctrine/inflector": "^1.1"
2325
},
2426
"suggest": {
2527
"ext-curl": "*",
@@ -34,11 +36,5 @@
3436
"psr-4": {
3537
"Elasticsearch\\Tests\\": "tests/Elasticsearch/Tests/"
3638
}
37-
},
38-
"repositories": [
39-
{
40-
"type": "vcs",
41-
"url": "https://github.com/polyfractal/Yaml"
42-
}
43-
]
39+
}
4440
}

phpunit-integration.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<phpunit
2+
bootstrap="tests/bootstrap.php"
3+
colors="true"
4+
convertNoticesToExceptions="true"
5+
convertWarningsToExceptions="true"
6+
convertErrorsToExceptions="true"
7+
syntaxCheck="true"
8+
verbose="true"
9+
>
10+
<php>
11+
<env name="ES_TEST_HOST" value="http://localhost:9200"/>
12+
</php>
13+
<testsuites>
14+
<testsuite>
15+
<file>tests/Elasticsearch/Tests/YamlRunnerTest.php</file>
16+
</testsuite>
17+
</testsuites>
18+
<filter>
19+
<whitelist>
20+
<directory suffix=".php">src</directory>
21+
</whitelist>
22+
</filter>
23+
</phpunit>

phpunit.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<testsuites>
1414
<testsuite>
1515
<directory>tests</directory>
16+
<exclude>tests/Elasticsearch/Tests/YamlRunnerTest.php</exclude>
1617
</testsuite>
1718
</testsuites>
1819
<filter>

src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public function getURI()
4747
public function getParamWhitelist()
4848
{
4949
return array(
50-
'include_yes_decisions'
50+
'include_yes_decisions',
51+
'include_disk_info',
5152
);
5253
}
5354

src/Elasticsearch/Endpoints/Cluster/Health.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function getParamWhitelist()
4444
'wait_for_nodes',
4545
'wait_for_relocating_shards',
4646
'wait_for_status',
47+
'wait_for_events',
4748
);
4849
}
4950

src/Elasticsearch/Endpoints/Indices/Create.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ public function getParamWhitelist()
6262
return array(
6363
'timeout',
6464
'master_timeout',
65-
'update_all_types'
65+
'update_all_types',
66+
'wait_for_active_shards'
6667
);
6768
}
6869

src/Elasticsearch/Endpoints/Indices/Rollover.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public function getParamWhitelist()
9494
{
9595
return array(
9696
'timeout',
97-
'master_timeout'
97+
'master_timeout',
98+
'wait_for_active_shards',
9899
);
99100
}
100101

src/Elasticsearch/Endpoints/Ingest/Pipeline/Get.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function getURI()
2727
'id is required for GetPipeline'
2828
);
2929
}
30+
3031
$id = $this->id;
3132
$uri = "/_ingest/pipeline/$id";
3233

0 commit comments

Comments
 (0)