Commit 01fd03f3 authored by Erin Krengel's avatar Erin Krengel
Browse files

tidying

parent 3a04ca55
......@@ -7,8 +7,8 @@ interface AcceptanceConfig {
project: string;
topic: gcp.pubsub.Topic;
bucket: gcp.storage.Bucket;
svcAccountEmail: string;
svcAccountId: string;
accSvcAccountEmail: string;
accSvcAccountId: string;
dockerTag: string;
appDeployment: k8s.apps.v1.Deployment;
appService: k8s.core.v1.Service;
......@@ -25,21 +25,21 @@ export function SetupAcceptanceTests(config: AcceptanceConfig): k8s.batch.v1.Job
// Give acceptance test svc account permission to subscribe from the subscription.
new gcp.pubsub.SubscriptionIAMMember(name, {
member: "serviceAccount:" + config.svcAccountEmail,
member: "serviceAccount:" + config.accSvcAccountEmail,
role: "roles/pubsub.subscriber",
subscription: subscription.name,
})
// Give acceptance test svc account permission to read from bucket.
new gcp.storage.BucketIAMMember(name, {
member: "serviceAccount:" + config.svcAccountEmail,
member: "serviceAccount:" + config.accSvcAccountEmail,
role: "roles/storage.objectAdmin",
bucket: config.bucket.name,
})
// Create a service account key for the acceptance test account.
const serviceAccountKey = new gcp.serviceAccount.Key(name, {
serviceAccountId: config.svcAccountId,
serviceAccountId: config.accSvcAccountId,
})
const decodedKey = serviceAccountKey.privateKey.apply(key => {
......
......@@ -29,7 +29,7 @@ export const topic = new gcp.pubsub.Topic(name, {
name: name + "-topic",
});
// Create egress topic.
// Create bucket.
export const bucket = new gcp.storage.Bucket(name + "-bucket", {
location: "us-west1",
});
......@@ -156,8 +156,8 @@ if (ENV.startsWith("test")) {
project: project,
topic: topic,
bucket: bucket,
svcAccountEmail: accTestSvcAccount.email,
svcAccountId: accTestSvcAccount.id,
accSvcAccountEmail: accTestSvcAccount.email,
accSvcAccountId: accTestSvcAccount.id,
dockerTag: DOCKER_TAG,
appDeployment: deployment,
appService: service,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment