Skip to content

Commit

Permalink
remove extra code
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-cit committed Oct 31, 2024
1 parent 5f382d6 commit 3c97c4b
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

output "artifact_repo" {
description = "GAR Repo created to store TF Cloud Builder images"
value = module.example.artifact_repo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/


output "artifact_repo" {
description = "GAR Repo created to store TF Cloud Builder images"
value = module.example.artifact_repo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ func TestIMCloudBuildWorkspaceGitHub(t *testing.T) {
}
if latestWorkflowRunStatus == "TIMEOUT" || latestWorkflowRunStatus == "FAILURE" {
t.Logf("%v", build[0])
// utils.PrintLog(t, "TestIMCloudBuildWorkspaceGitHub", projectID)
t.Fatalf("workflow %s failed with failureInfo %s", build[0].Get("id"), build[0].Get("failureInfo"))
}
return true, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ func TestIMCloudBuildWorkspaceGitLab(t *testing.T) {
}
if latestWorkflowRunStatus == "TIMEOUT" || latestWorkflowRunStatus == "FAILURE" {
t.Logf("%v", build[0])
// utils.PrintLog(t, "TestIMCloudBuildWorkspaceGitLab", projectID)
t.Fatalf("workflow %s failed with status %s", build[0].Get("id"), latestWorkflowRunStatus)
return false, nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ func TestTFCloudBuildBuilderGitHub(t *testing.T) {
}
if latestWorkflowRunStatus == "TIMEOUT" || latestWorkflowRunStatus == "FAILURE" {
t.Logf("%v", build[0])
// utils.PrintLog(t, "TestTFCloudBuildBuilderGitHub", projectID)
t.Fatalf("workflow %s failed with failureInfo %s", build[0].Get("id"), build[0].Get("failureInfo"))
}
return true, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ func TestTFCloudBuildBuilderGitLab(t *testing.T) {
}
if latestWorkflowRunStatus == "TIMEOUT" || latestWorkflowRunStatus == "FAILURE" {
t.Logf("%v", build[0])
// utils.PrintLog(t, "TestTFCloudBuildBuilderGitLab", projectID)
t.Fatalf("workflow %s failed with failureInfo %s", build[0].Get("id"), build[0].Get("failureInfo"))
}
return true, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ func TestCloudBuildWorkspaceSimpleGitHub(t *testing.T) {
}
if latestWorkflowRunStatus == "TIMEOUT" || latestWorkflowRunStatus == "FAILURE" {
t.Logf("%v", build[0])
// utils.PrintLog(t, "TestCloudBuildWorkspaceSimpleGitHub", projectID)
t.Fatalf("workflow %s failed with failureInfo %s", build[0].Get("id"), build[0].Get("failureInfo"))
}
return true, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ func TestCloudBuildWorkspaceSimpleGitLab(t *testing.T) {
}
if latestWorkflowRunStatus == "TIMEOUT" || latestWorkflowRunStatus == "FAILURE" {
t.Logf("%v", build[0])
// utils.PrintLog(t, "TestCloudBuildWorkspaceSimpleGitLab", projectID)
t.Fatalf("workflow %s failed with status %s", build[0].Get("id"), latestWorkflowRunStatus)
return false, nil
}
Expand Down
11 changes: 0 additions & 11 deletions test/integration/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
package utils

import (
"fmt"
"os"
"strings"
"testing"

"github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/gcloud"
"github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/tft"
)

Expand All @@ -46,12 +44,3 @@ func GetFileContents(t *testing.T, path string) []byte {
func LastElement(str, sep string) string {
return strings.Split(str, sep)[len(strings.Split(str, sep))-1]
}

// PrintLogErrors print the logs of severity ERROR to the test output.
func PrintLog(t *testing.T, tag, projectID string) {
logsCmd := fmt.Sprintf("logging read --project=%s --order=asc", projectID)
logs := gcloud.Runf(t, logsCmd).Array()
for _, log := range logs {
t.Logf("%s build-log: %s", tag, log.Get("textPayload").String())
}
}

0 comments on commit 3c97c4b

Please sign in to comment.