Skip to content

Commit b02402a

Browse files
author
Takashi Matsuo
authored
Suppress test when env vars are not available. (GoogleCloudPlatform#123)
1 parent 74871e6 commit b02402a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

appengine/flexible/cloudsql/tests/LocalTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ public function createApplication()
3232
$app['mysql.dsn'] = getenv('MYSQL_DSN');
3333
$app['mysql.user'] = getenv('MYSQL_USER');
3434
$app['mysql.password'] = getenv('MYSQL_PASSWORD');
35+
if ($app['mysql.dsn'] === false ||
36+
$app['mysql.user'] === false ||
37+
$app['mysql.password'] === false) {
38+
$this->markTestSkipped('set the MYSQL_DSN, MYSQL_USER and MYSQL_PASSWORD environment variables');
39+
}
3540
return $app;
3641
}
3742

0 commit comments

Comments
 (0)