File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 17
17
18
18
namespace Google \Cloud \Samples \PubSub ;
19
19
20
+ use Google \Auth \Credentials \ServiceAccountCredentials ;
20
21
use Google \Cloud \TestUtils \TestTrait ;
21
22
use Google \Cloud \TestUtils \ExecuteCommandTrait ;
22
23
use Google \Cloud \TestUtils \EventuallyConsistentTestTrait ;
@@ -32,10 +33,17 @@ class PubSubTest extends TestCase
32
33
use EventuallyConsistentTestTrait;
33
34
34
35
private static $ eodSubscriptionId ;
36
+ private static $ awsRoleArn = "arn:aws:iam::111111111111:role/fake-role-name " ;
37
+ private static $ gcpServiceAccount ;
35
38
36
39
public static function setUpBeforeClass (): void
37
40
{
38
41
self ::$ eodSubscriptionId = 'test-eod-subscription- ' . rand ();
42
+ $ serviceAccountPath = self ::requireEnv ('GOOGLE_APPLICATION_CREDENTIALS ' );
43
+ $ serviceAccountCredentials = new ServiceAccountCredentials (
44
+ 'https://www.googleapis.com/auth/cloud-platform ' ,
45
+ $ serviceAccountPath );
46
+ self ::$ gcpServiceAccount = $ serviceAccountCredentials ->getClientName ();
39
47
}
40
48
41
49
public function testSubscriptionPolicy ()
You can’t perform that action at this time.
0 commit comments