Skip to content

Commit

Permalink
Standardize all tests to use one phpunit and google/cloud-tools (Goog…
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer authored Jun 17, 2019
1 parent 73439cc commit 33654dc
Show file tree
Hide file tree
Showing 317 changed files with 612 additions and 1,869 deletions.
7 changes: 2 additions & 5 deletions .kokoro/docker/php73/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ RUN apt-get update && \
zip \
zlib1g-dev

RUN wget -nv -O phpunit.phar https://phar.phpunit.de/phpunit-7.phar && \
chmod +x phpunit.phar && \
mv phpunit.phar /usr/local/bin/phpunit && \
ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a && \
RUN ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a && \
mkdir ${PHP_DIR} ${PHP_SRC_DIR} && \
cd ${PHP_SRC_DIR} && \
wget http://us1.php.net/get/php-7.3.0.tar.bz2/from/this/mirror \
Expand Down Expand Up @@ -110,7 +107,7 @@ RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz \
--command-completion false

# Make composer and gcloud bins available via the PATH variable
ENV PATH="$PATH:/opt/composer/vendor/bin:/root/google-cloud-sdk/bin"
ENV PATH="$PATH:/root/google-cloud-sdk/bin:/root/.composer/vendor/bin"

# Configure Google Cloud SDK
RUN gcloud config set app/promote_by_default false && \
Expand Down
3 changes: 3 additions & 0 deletions .kokoro/system_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,8 @@ if [ "${RUN_CS_CHECK}" = "true" ]; then
bash testing/run_cs_check.sh
fi

# Install global test dependencies
bash testing/composer.sh

# Run tests
bash testing/run_test_suite.sh
3 changes: 0 additions & 3 deletions appengine/flexible/analytics/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
"twig/twig": "^1.24",
"guzzlehttp/guzzle": "^6.3",
"symfony/css-selector": "^3.1"
},
"require-dev": {
"google/cloud-tools": "^0.6"
}
}
2 changes: 1 addition & 1 deletion appengine/flexible/analytics/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<phpunit bootstrap="test/bootstrap.php" colors="true">
<phpunit bootstrap="../../../testing/bootstrap.php" colors="true">
<php>
<env name="GA_TRACKING_ID" value="UA-78971600-1"/>
</php>
Expand Down
3 changes: 2 additions & 1 deletion appengine/flexible/analytics/test/DeployTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
namespace Google\Cloud\Samples\AppEngine\Analytics;

use Google\Cloud\TestUtils\AppEngineDeploymentTrait;
use PHPUnit\Framework\TestCase;

class DeployTest extends \PHPUnit_Framework_TestCase
class DeployTest extends TestCase
{
use AppEngineDeploymentTrait;

Expand Down
21 changes: 0 additions & 21 deletions appengine/flexible/analytics/test/bootstrap.php

This file was deleted.

1 change: 0 additions & 1 deletion appengine/flexible/cloudsql-mysql/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"google/apiclient": "^2.0"
},
"require-dev": {
"google/cloud-tools": "^0.6",
"paragonie/random_compat": "^2.0"
}
}
2 changes: 1 addition & 1 deletion appengine/flexible/cloudsql-mysql/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<phpunit bootstrap="./test/bootstrap.php" colors="true">
<phpunit bootstrap="../../../testing/bootstrap.php" colors="true">
<testsuites>
<testsuite>
<directory>test</directory>
Expand Down
3 changes: 2 additions & 1 deletion appengine/flexible/cloudsql-mysql/test/DeployTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@

use Google\Cloud\TestUtils\AppEngineDeploymentTrait;
use Google\Cloud\TestUtils\FileUtil;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Yaml\Yaml;

class DeployTest extends \PHPUnit_Framework_TestCase
class DeployTest extends TestCase
{
use AppEngineDeploymentTrait;

Expand Down
22 changes: 0 additions & 22 deletions appengine/flexible/cloudsql-mysql/test/bootstrap.php

This file was deleted.

1 change: 0 additions & 1 deletion appengine/flexible/cloudsql-postgres/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"google/apiclient": "^2.0"
},
"require-dev": {
"google/cloud-tools": "^0.6",
"paragonie/random_compat": "^2.0"
}
}
2 changes: 1 addition & 1 deletion appengine/flexible/cloudsql-postgres/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<phpunit bootstrap="./test/bootstrap.php" colors="true">
<phpunit bootstrap="../../../testing/bootstrap.php" colors="true">
<testsuites>
<testsuite>
<directory>test</directory>
Expand Down
3 changes: 2 additions & 1 deletion appengine/flexible/cloudsql-postgres/test/DeployTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@

use Google\Cloud\TestUtils\AppEngineDeploymentTrait;
use Google\Cloud\TestUtils\FileUtil;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Yaml\Yaml;

class DeployTest extends \PHPUnit_Framework_TestCase
class DeployTest extends TestCase
{
use AppEngineDeploymentTrait;

Expand Down
22 changes: 0 additions & 22 deletions appengine/flexible/cloudsql-postgres/test/bootstrap.php

This file was deleted.

3 changes: 1 addition & 2 deletions appengine/flexible/datastore/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"google/cloud-datastore": "^1.0"
},
"require-dev": {
"guzzlehttp/guzzle": "^6.3",
"google/cloud-tools": "^0.6"
"guzzlehttp/guzzle": "^6.3"
}
}
2 changes: 1 addition & 1 deletion appengine/flexible/datastore/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<phpunit bootstrap="test/bootstrap.php" colors="true">
<phpunit bootstrap="../../../testing/bootstrap.php" colors="true">
<testsuites>
<testsuite>
<directory>test</directory>
Expand Down
21 changes: 0 additions & 21 deletions appengine/flexible/datastore/test/bootstrap.php

This file was deleted.

1 change: 0 additions & 1 deletion appengine/flexible/drupal8/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
},
"require-dev": {
"guzzlehttp/guzzle": "^6.3",
"google/cloud-tools": "^0.6",
"monolog/monolog": "^1.19",
"symfony/console": " ^2.7",
"symfony/process": "^3.0",
Expand Down
2 changes: 1 addition & 1 deletion appengine/flexible/drupal8/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<phpunit bootstrap="test/bootstrap.php">
<phpunit bootstrap="../../../testing/bootstrap.php">
<testsuites>
<testsuite name="Drupal deployment test">
<directory>test</directory>
Expand Down
19 changes: 0 additions & 19 deletions appengine/flexible/drupal8/test/bootstrap.php

This file was deleted.

1 change: 0 additions & 1 deletion appengine/flexible/laravel/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"symfony\/process": "~2.8|~3.0",
"monolog\/monolog": "^1.19",
"guzzlehttp\/guzzle": "^6.2",
"google/cloud-tools": "^0.6",
"paragonie/random_compat": " ^2.0"
}
}
2 changes: 1 addition & 1 deletion appengine/flexible/laravel/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<phpunit bootstrap="test/bootstrap.php">
<phpunit bootstrap="../../../testing/bootstrap.php">
<testsuites>
<testsuite name="Laravel deployment test">
<directory>test</directory>
Expand Down
19 changes: 0 additions & 19 deletions appengine/flexible/laravel/test/bootstrap.php

This file was deleted.

1 change: 0 additions & 1 deletion appengine/flexible/logging/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"twig/twig": "^1.29"
},
"require-dev": {
"google/cloud-tools": "^0.6",
"guzzlehttp/guzzle": "^6.3",
"symfony/browser-kit": "^3.2"
}
Expand Down
2 changes: 1 addition & 1 deletion appengine/flexible/logging/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<phpunit bootstrap="test/bootstrap.php">
<phpunit bootstrap="../../../testing/bootstrap.php">
<testsuites>
<testsuite name="AppEngine Flex logging test">
<directory>test</directory>
Expand Down
21 changes: 0 additions & 21 deletions appengine/flexible/logging/test/bootstrap.php

This file was deleted.

1 change: 0 additions & 1 deletion appengine/flexible/mailgun/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"symfony/yaml": "^3.1"
},
"require-dev": {
"google/cloud-tools": "^0.6",
"paragonie/random_compat": "^2.0",
"symfony/browser-kit": "^3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion appengine/flexible/mailgun/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<phpunit bootstrap="test/bootstrap.php">
<phpunit bootstrap="../../../testing/bootstrap.php">
<testsuites>
<testsuite name="PHP AppEngine Flexible Mailgun test">
<directory>test</directory>
Expand Down
3 changes: 2 additions & 1 deletion appengine/flexible/mailgun/test/DeployTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@

use Google\Cloud\TestUtils\AppEngineDeploymentTrait;
use Google\Cloud\TestUtils\FileUtil;
use PHPUnit\Framework\TestCase;

class DeployTest extends \PHPUnit_Framework_TestCase
class DeployTest extends TestCase
{
use AppEngineDeploymentTrait;

Expand Down
22 changes: 0 additions & 22 deletions appengine/flexible/mailgun/test/bootstrap.php

This file was deleted.

3 changes: 1 addition & 2 deletions appengine/flexible/mailjet/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
},
"require-dev": {
"symfony/browser-kit": "^3.0",
"paragonie/random_compat": "^2.0",
"google/cloud-tools": "^0.6"
"paragonie/random_compat": "^2.0"
}
}
Loading

0 comments on commit 33654dc

Please sign in to comment.