From 909085ef15647faf7679a9800c47bf8e5a5f59d0 Mon Sep 17 00:00:00 2001 From: Celeste Zeng <61256376+celeste-zeng@users.noreply.github.com> Date: Tue, 29 Aug 2023 15:46:23 -0700 Subject: [PATCH 1/3] Update integration.go to exclude one failed test --- sdks/go/test/integration/integration.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdks/go/test/integration/integration.go b/sdks/go/test/integration/integration.go index 845d54195f8f..fbd9431488fa 100644 --- a/sdks/go/test/integration/integration.go +++ b/sdks/go/test/integration/integration.go @@ -42,6 +42,7 @@ import ( "strings" "testing" "time" + "os" // common runner flag. "github.com/apache/beam/sdks/v2/go/pkg/beam/options/jobopts" @@ -291,6 +292,13 @@ var dataflowFilters = []string{ "TestDrain", } +var user = os.Getenv("USER") + +// TODO: github-actions service account doesn't have permission to healthcare.fhirStores.create. +if USER == "github-actions" { + dataflowFilters.append("TestFhirIO.*") +} + // CheckFilters checks if an integration test is filtered to be skipped, either // because the intended runner does not support it, or the test is sickbayed. // This method should be called at the beginning of any integration test. If From 2c13653163959576b32900576bea639e41ac1801 Mon Sep 17 00:00:00 2001 From: Celeste Zeng <61256376+celeste-zeng@users.noreply.github.com> Date: Tue, 29 Aug 2023 19:10:24 -0700 Subject: [PATCH 2/3] fix go syntax --- sdks/go/test/integration/integration.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sdks/go/test/integration/integration.go b/sdks/go/test/integration/integration.go index fbd9431488fa..5626ba35e14a 100644 --- a/sdks/go/test/integration/integration.go +++ b/sdks/go/test/integration/integration.go @@ -292,13 +292,6 @@ var dataflowFilters = []string{ "TestDrain", } -var user = os.Getenv("USER") - -// TODO: github-actions service account doesn't have permission to healthcare.fhirStores.create. -if USER == "github-actions" { - dataflowFilters.append("TestFhirIO.*") -} - // CheckFilters checks if an integration test is filtered to be skipped, either // because the intended runner does not support it, or the test is sickbayed. // This method should be called at the beginning of any integration test. If @@ -309,6 +302,12 @@ func CheckFilters(t *testing.T) { panic("ptest.Main() has not been called: please override TestMain to ensure that the integration test runs properly.") } + var user = os.Getenv("USER") + // TODO: github-actions service account doesn't have permission to healthcare.fhirStores.create. + if user == "github-actions" { + dataflowFilters.append("TestFhirIO.*") + } + // Check for sickbaying first. n := t.Name() for _, f := range sickbay { @@ -326,7 +325,7 @@ func CheckFilters(t *testing.T) { s1 := rand.NewSource(time.Now().UnixNano()) r1 := rand.New(s1) *jobopts.JobName = fmt.Sprintf("go-%v-%v", strings.ToLower(n), r1.Intn(1000)) - + // Test for runner-specific skipping second. var filters []string runner := *ptest.Runner From 7267cb8c7eea11c372f8a97c696906b1a18c11c8 Mon Sep 17 00:00:00 2001 From: Celeste Zeng <61256376+celeste-zeng@users.noreply.github.com> Date: Tue, 29 Aug 2023 19:23:43 -0700 Subject: [PATCH 3/3] Fix usage of append --- sdks/go/test/integration/integration.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/go/test/integration/integration.go b/sdks/go/test/integration/integration.go index 5626ba35e14a..ac3fba740d31 100644 --- a/sdks/go/test/integration/integration.go +++ b/sdks/go/test/integration/integration.go @@ -305,7 +305,7 @@ func CheckFilters(t *testing.T) { var user = os.Getenv("USER") // TODO: github-actions service account doesn't have permission to healthcare.fhirStores.create. if user == "github-actions" { - dataflowFilters.append("TestFhirIO.*") + dataflowFilters = append(dataflowFilters, "TestFhirIO.*") } // Check for sickbaying first.