Skip to content

Commit 5aa8b17

Browse files
committed
Updated the Utility for testing
1 parent 78aca6f commit 5aa8b17

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/Utility.php

+6
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ public static function getHost(): ?string
7878
*/
7979
public static function getClient(): Client
8080
{
81+
if (getenv('TEST_SUITE') === 'serverless' || getenv('TEST_SUITE') === 'cloud') {
82+
return ClientBuilder::create()
83+
->setHosts([self::getHost()])
84+
->setApiKey(getenv('ELASTIC_API_KEY'))
85+
->build();
86+
}
8187
if (getenv('TEST_SUITE') === 'free') {
8288
return ClientBuilder::create()
8389
->setHosts([self::getHost()])

0 commit comments

Comments
 (0)