Skip to content

Commit

Permalink
Updated test code generator with better is-null support
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimuel committed Nov 6, 2020
1 parent b72b9b0 commit ebd7dc1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
9 changes: 7 additions & 2 deletions tests/Elasticsearch/Tests/Utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,16 @@ private static function wipeCluster(Client $client): void
if (getenv('TEST_SUITE') === 'xpack') {
self::wipeRollupJobs($client);
self::waitForPendingRollupTasks($client);

self::deleteAllSLMPolicies($client);
}
self::deleteAllSLMPolicies($client);

self::wipeSnapshots($client);
self::wipeDataStreams($client);

if (getenv('TEST_SUITE') === 'xpack') {
self::wipeDataStreams($client);
}

self::wipeAllindices($client);

if (getenv('TEST_SUITE') === 'xpack') {
Expand Down
1 change: 1 addition & 0 deletions util/YamlTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class YamlTests
const SKIPPED_TEST_OSS = [
'Cat\Nodeattrs\_10_BasicTest::TestCatNodesAttrsOutput' => 'Regexp error, it seems not compatible with PHP',
'Cat\Shards\_10_BasicTest::TestCatShardsOutput' => 'Regexp error, it seems not compatible with PHP',
'Indices\Create\_20_Mix_Typeless_TypefulTest::CreateATypedIndexWhileThereIsATypelessTemplate' => 'mismatch on warning header',
'Search\Aggregation\_10_HistogramTest::HistogramProfiler' => "Error reading 'n' field from YAML",
];

Expand Down
6 changes: 5 additions & 1 deletion util/template/test/is-null
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
$this->assertNull($response:value);
if (isset($response:value)) {
$this->assertNull($response:value);
} else {
$this->assertTrue(true);
}

0 comments on commit ebd7dc1

Please sign in to comment.