Skip to content

Commit 0a46723

Browse files
committed
blue/green tests
1 parent 57b2e3c commit 0a46723

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/IndexTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace Limenet\LaravelElasticaBridge\Tests;
44

55
use Elastica\Index;
6+
use Limenet\LaravelElasticaBridge\Exception\Index\BlueGreenIndicesIncorrectlySetupException;
7+
use Limenet\LaravelElasticaBridge\Index\IndexInterface;
68
use Limenet\LaravelElasticaBridge\Tests\App\Elasticsearch\CustomerIndex;
79
use Limenet\LaravelElasticaBridge\Tests\App\Models\Customer;
810
use RuntimeException;
@@ -59,4 +61,11 @@ public function empty_document_to_model()
5961
$this->expectException(RuntimeException::class);
6062
$this->customerIndex->getModelInstance($document);
6163
}
64+
/** @test */
65+
public function blue_green()
66+
{
67+
$this->assertFalse($this->customerIndex->hasBlueGreenIndices());
68+
$this->expectException(BlueGreenIndicesIncorrectlySetupException::class);
69+
$this->customerIndex->getBlueGreenActiveElasticaIndex();
70+
}
6271
}

0 commit comments

Comments
 (0)