Skip to content

Commit ca8abb1

Browse files
authored
Refactor storage tests for Kokoro (GoogleCloudPlatform#720)
1 parent 501dc40 commit ca8abb1

11 files changed

+400
-761
lines changed

.kokoro/secrets.sh.enc

73 Bytes
Binary file not shown.

.kokoro/system_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ set -ex
2020
cd github/php-docs-samples
2121

2222
export GOOGLE_APPLICATION_CREDENTIALS=$KOKORO_GFILE_DIR/service-account.json
23+
export PATH="$PATH:/opt/composer/vendor/bin:/root/google-cloud-sdk/bin"
2324

2425
# export the secrets
2526
if [ -f ${GOOGLE_APPLICATION_CREDENTIALS} ]; then

dlp/src/inspect_gcs.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ function inspect_gcs(
5252
$maxFindings = 0
5353
) {
5454
// Instantiate a client.
55-
$dlp = new DlpServiceClient();
56-
$pubsub = new PubSubClient();
55+
$dlp = new DlpServiceClient([
56+
'projectId' => $callingProjectId,
57+
]);
58+
$pubsub = new PubSubClient([
59+
'projectId' => $callingProjectId,
60+
]);
5761
$topic = $pubsub->topic($topicId);
5862

5963
// The infoTypes of information to match

storage/storage.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use Symfony\Component\Console\Command\Command;
2323
use Symfony\Component\Console\Input\InputArgument;
2424
use Symfony\Component\Console\Input\InputOption;
25+
use InvalidArgumentException;
2526

2627
$application = new Application();
2728

storage/test/BucketAclCommandTest.php

Lines changed: 0 additions & 104 deletions
This file was deleted.

storage/test/BucketDefaultAclCommandTest.php

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)