Skip to content

Commit e6d6e80

Browse files
committed
[TEST] update mechanism to retrieve yaml tests
1 parent e57c952 commit e6d6e80

File tree

5 files changed

+45
-2
lines changed

5 files changed

+45
-2
lines changed

Diff for: .gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "util/elasticsearch"]
2+
path = util/elasticsearch
3+
url = https://github.com/elasticsearch/elasticsearch.git

Diff for: composer.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@
2525
"satooshi/php-coveralls": "dev-master",
2626
"mikey179/vfsStream": "~1.2",
2727
"twig/twig": "1.*",
28-
"elasticsearch/elasticsearch_src" : "dev-master"
28+
"cpliakas/git-wrapper": "~1.0"
2929
},
3030
"autoload": {
3131
"psr-0": {
3232
"Elasticsearch": "src/",
3333
"Elasticsearch\\Tests" : "tests/",
3434
"Elasticsearch\\Benchmarks" : "benchmarks/"
3535
}
36+
<<<<<<< HEAD
3637
},
3738
"repositories":[
3839
{
@@ -49,4 +50,7 @@
4950
}
5051
}
5152
]
53+
=======
54+
}
55+
>>>>>>> fd6b8a9... Update mechanism to retrieve yaml tests
5256
}

Diff for: tests/Elasticsearch/Tests/YamlRunnerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ private function waitForYellow()
165165

166166
public static function provider()
167167
{
168-
$path = dirname(__FILE__).'/../../../vendor/elasticsearch/elasticsearch_src/rest-api-spec/test/';
168+
$path = dirname(__FILE__).'/../../../util/elasticsearch/rest-api-spec/test/';
169169

170170
$files = array();
171171
$objects = new RecursiveIteratorIterator(

Diff for: util/RestSpecRunner.php

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
/**
3+
* User: zach
4+
* Date: 3/5/14
5+
* Time: 10:41 AM
6+
*/
7+
8+
error_reporting(E_ALL | E_STRICT);
9+
10+
// Set the default timezone. While this doesn't cause any tests to fail, PHP
11+
// complains if it is not set in 'date.timezone' of php.ini.
12+
date_default_timezone_set('UTC');
13+
14+
// Ensure that composer has installed all dependencies
15+
if (!file_exists(dirname(__DIR__) . '/composer.lock')) {
16+
die("Dependencies must be installed using composer:\n\nphp composer.phar install --dev\n\n"
17+
. "See http://getcomposer.org for help with installing composer\n");
18+
}
19+
20+
// Include the composer autoloader
21+
$autoloader = require_once(dirname(__DIR__) . '/vendor/autoload.php');
22+
23+
24+
$gitWrapper = new \GitWrapper\GitWrapper();
25+
$git = $gitWrapper->workingCopy(dirname(__DIR__) . '/util/elasticsearch');
26+
27+
28+
29+
echo "Update elasticsearch submodule\n";
30+
$git->fetchAll(array('verbose' => true));
31+
32+
33+
$hash = $_SERVER['TEST_BUILD_REF'];
34+
echo "Checkout yaml tests (hash: $hash)\n";
35+
$git->checkout($hash, array('force' => true, 'quiet' => true));

Diff for: util/elasticsearch

Submodule elasticsearch added at 992747a

0 commit comments

Comments
 (0)