Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Phasing out CSR dependency #1315

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 0-bootstrap/cb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ module "tf_source" {
"logging.googleapis.com",
"iam.googleapis.com",
"admin.googleapis.com",
"sourcerepo.googleapis.com",
// "sourcerepo.googleapis.com", // issue #1309: Docker tests fail due to CSR dependency
"workflows.googleapis.com",
"artifactregistry.googleapis.com",
"cloudbuild.googleapis.com",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module "app_infra_cloudbuild_project" {
project_prefix = local.project_prefix
activate_apis = [
"cloudbuild.googleapis.com",
"sourcerepo.googleapis.com",
// "sourcerepo.googleapis.com", // issue #1309: Docker tests fail due to CSR dependency
"cloudkms.googleapis.com",
"iam.googleapis.com",
"artifactregistry.googleapis.com",
Expand Down
32 changes: 17 additions & 15 deletions test/integration/bootstrap/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,16 @@ func TestBootstrap(t *testing.T) {
tft.WithPolicyLibraryPath("/workspace/policy-library", temp.GetTFSetupStringOutput("project_id")),
)

cloudSourceRepos := []string{
"gcp-org",
"gcp-environments",
"gcp-networks",
"gcp-projects",
"gcp-policies",
"tf-cloudbuilder",
"gcp-bootstrap",
}
// issue #1309: Docker tests fail due to CSR dependency
// cloudSourceRepos := []string{
// "gcp-org",
// "gcp-environments",
// "gcp-networks",
// "gcp-projects",
// "gcp-policies",
// "tf-cloudbuilder",
// "gcp-bootstrap",
// }

triggerRepos := []string{
"gcp-bootstrap",
Expand Down Expand Up @@ -111,7 +112,7 @@ func TestBootstrap(t *testing.T) {
"storage-api.googleapis.com",
"serviceusage.googleapis.com",
"cloudbuild.googleapis.com",
"sourcerepo.googleapis.com",
// "sourcerepo.googleapis.com", // issue #1309: Docker tests fail due to CSR dependency
"cloudkms.googleapis.com",
"bigquery.googleapis.com",
"accesscontextmanager.googleapis.com",
Expand Down Expand Up @@ -207,11 +208,12 @@ func TestBootstrap(t *testing.T) {
assert.Equal(logsBktName[bkts.env], fmt.Sprintf("bkt-%s-%s-build-logs", cbProjectID, bkts.repo))
}

for _, repo := range cloudSourceRepos {
sourceRepoFullName := fmt.Sprintf("projects/%s/repos/%s", cbProjectID, repo)
sourceRepo := gcloud.Runf(t, "source repos describe %s --project %s", repo, cbProjectID)
assert.Equal(sourceRepoFullName, sourceRepo.Get("name").String(), fmt.Sprintf("repository %s should exist", repo))
}
// issue #1309: Docker tests fail due to CSR dependency
// for _, repo := range cloudSourceRepos {
// sourceRepoFullName := fmt.Sprintf("projects/%s/repos/%s", cbProjectID, repo)
// sourceRepo := gcloud.Runf(t, "source repos describe %s --project %s", repo, cbProjectID)
// assert.Equal(sourceRepoFullName, sourceRepo.Get("name").String(), fmt.Sprintf("repository %s should exist", repo))
// }

for _, triggerRepo := range triggerRepos {
for _, filter := range []string{
Expand Down
2 changes: 1 addition & 1 deletion test/integration/projects-shared/projects_shared_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestProjectsShared(t *testing.T) {

var sharedApisEnabled = []string{
"cloudbuild.googleapis.com",
"sourcerepo.googleapis.com",
// "sourcerepo.googleapis.com", // issue #1309: Docker tests fail due to CSR dependency
"cloudkms.googleapis.com",
}

Expand Down
2 changes: 1 addition & 1 deletion test/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module "project" {
"storage-api.googleapis.com",
"serviceusage.googleapis.com",
"cloudbuild.googleapis.com",
"sourcerepo.googleapis.com",
// "sourcerepo.googleapis.com", // issue #1309: Docker tests fail due to CSR dependency
"cloudkms.googleapis.com",
"bigquery.googleapis.com",
"accesscontextmanager.googleapis.com",
Expand Down