Skip to content

Commit 9707d23

Browse files
fix lint
1 parent ed6904a commit 9707d23

File tree

6 files changed

+14
-18
lines changed

6 files changed

+14
-18
lines changed

5-app-infra/business_unit_1/development/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
| instances\_zones | List of zone for compute instances |
1919
| project\_id | Project where compute instance was created |
2020
| region | Region where compute instance was created |
21+
| workload\_identity\_pool\_id | Workload identity pool ID. |
22+
| workload\_pool\_provider\_id | Workload pool provider used by confidential space. |
2123

2224
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

5-app-infra/business_unit_1/nonproduction/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
| instances\_zones | List of zone for compute instances |
1919
| project\_id | Project where compute instance was created |
2020
| region | Region where compute instance was created |
21+
| workload\_identity\_pool\_id | Workload identity pool ID. |
22+
| workload\_pool\_provider\_id | Workload pool provider used by confidential space. |
2123

2224
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

5-app-infra/business_unit_1/production/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
| instances\_zones | List of zone for compute instances |
1919
| project\_id | Project where compute instance was created |
2020
| region | Region where compute instance was created |
21+
| workload\_identity\_pool\_id | Workload identity pool ID. |
22+
| workload\_pool\_provider\_id | Workload pool provider used by confidential space. |
2123

2224
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

5-app-infra/modules/confidential_space/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
| instances\_details | List of details for compute instances |
2727
| instances\_self\_links | List of self-links for compute instances |
2828
| project\_id | Project where compute instance was created |
29+
| workload\_identity\_pool\_id | Workload identity pool ID. |
30+
| workload\_pool\_provider\_id | Workload pool provider used by confidential space. |
2931

3032
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
3133

test/integration/app-infra/app_infra_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func TestAppInfra(t *testing.T) {
7979
gcOps := gcloud.WithCommonArgs([]string{"--project", projectID, "--zone", instanceZone, "--format", "json"})
8080
instance := gcloud.Run(t, fmt.Sprintf("compute instances describe %s", instanceName), gcOps)
8181
assert.Equal(machineType, instance.Get("machineType").String(), "should have machine_type f1-micro")
82-
82+
8383
computeInstanceList := gcloud.Run(t, fmt.Sprintf("compute instances list --format=json --project %s --filter name=confidential-instance", projectID))
8484
assert.Len(computeInstanceList.Array(), 1)
8585
computeInstance := computeInstanceList.Array()[0]

test/integration/projects/projects_test.go

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -178,24 +178,12 @@ func TestProjects(t *testing.T) {
178178

179179
enabledAPIS := gcloud.Runf(t, "services list --project %s --impersonate-service-account %s", projectID, terraformSA).Array()
180180
listApis := testutils.GetResultFieldStrSlice(enabledAPIS, "config.name")
181-
assert.Subset(listApis, restrictedApisEnabled, "APIs should have been enabled")
182-
183-
sharedProjectNumber := projects.GetStringOutput("confidential_space_project_number")
184-
perimeter, err := gcloud.RunCmdE(t, fmt.Sprintf("access-context-manager perimeters dry-run describe %s --policy %s", perimeterName, policyID))
185-
assert.NoError(err)
186-
assert.True(strings.Contains(perimeter, sharedProjectNumber), fmt.Sprintf("dry-run service perimeter %s should contain project %s", perimeterName, sharedProjectNumber))
187-
188-
sharedVPC := gcloud.Runf(t, "compute shared-vpc get-host-project %s --impersonate-service-account %s", projectID, terraformSA)
189-
assert.NotEmpty(sharedVPC.Map())
190-
191-
hostProjectID := sharedVPC.Get("name").String()
192-
hostProject := gcloud.Runf(t, "projects describe %s --impersonate-service-account %s", hostProjectID, terraformSA)
193-
assert.Equal("shared-vpc-host", hostProject.Get("labels.application_name").String(), "host project should have application_name label equals to shared-vpc-host")
194-
assert.Equal(env, hostProject.Get("labels.environment").String(), fmt.Sprintf("project should have environment label %s", env))
195-
196-
hostNetwork := gcloud.Runf(t, "compute networks list --project %s --impersonate-service-account %s", hostProjectID, terraformSA).Array()[0]
197-
assert.Equal(tt.sharedNetwork, hostNetwork.Get("name").String(), "should have a shared vpc")
181+
assert.Subset(listApis, confidentialRestrictedApisEnabled, "API should have been enabled")
198182

183+
confidentialSpaceWorkloadSAEmail := projects.GetStringOutput("confidential_space_workload_sa")
184+
confidentialSpaceSAName := fmt.Sprintf("projects/%s/serviceAccounts/%s", projectID, confidentialSpaceWorkloadSAEmail)
185+
confidentialSpaceSA := gcloud.Runf(t, "iam service-accounts describe %s --project %s", confidentialSpaceWorkloadSAEmail, projectID)
186+
assert.Equal(confidentialSpaceSAName, confidentialSpaceSA.Get("name").String(), fmt.Sprintf("service account %s should exist", confidentialSpaceWorkloadSAEmail))
199187
}
200188

201189
if projectOutput == "floating_project" {

0 commit comments

Comments
 (0)