From cbedf861a400edee71f781d812c1aab8b68e2498 Mon Sep 17 00:00:00 2001 From: Yuri Date: Fri, 4 Oct 2024 17:02:55 -0700 Subject: [PATCH] move all functional tests into the same folder --- tests/{visibility => }/advanced_visibility_test.go | 2 +- tests/{namespace => }/namespace_delete_test.go | 2 +- tests/{namespace => }/namespace_interceptor_test.go | 2 +- tests/{nexus => }/nexus_api_test.go | 2 +- tests/{nexus => }/nexus_endpoint_test.go | 2 +- tests/{nexus => }/nexus_test_base.go | 2 +- tests/{nexus => }/nexus_workflow_test.go | 2 +- tests/{update => }/reset_workflow_test.go | 2 +- tests/{update => }/update_workflow_sdk_test.go | 2 +- tests/{update => }/update_workflow_suite_base.go | 7 ++++++- tests/{update => }/update_workflow_test.go | 7 +------ tests/{visibility => }/workflow_visibility_test.go | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) rename tests/{visibility => }/advanced_visibility_test.go (99%) rename tests/{namespace => }/namespace_delete_test.go (99%) rename tests/{namespace => }/namespace_interceptor_test.go (99%) rename tests/{nexus => }/nexus_api_test.go (99%) rename tests/{nexus => }/nexus_endpoint_test.go (99%) rename tests/{nexus => }/nexus_test_base.go (99%) rename tests/{nexus => }/nexus_workflow_test.go (99%) rename tests/{update => }/reset_workflow_test.go (99%) rename tests/{update => }/update_workflow_sdk_test.go (99%) rename tests/{update => }/update_workflow_suite_base.go (97%) rename tests/{update => }/update_workflow_test.go (99%) rename tests/{visibility => }/workflow_visibility_test.go (99%) diff --git a/tests/visibility/advanced_visibility_test.go b/tests/advanced_visibility_test.go similarity index 99% rename from tests/visibility/advanced_visibility_test.go rename to tests/advanced_visibility_test.go index 071f311aa6c..e984c6b3b8e 100644 --- a/tests/visibility/advanced_visibility_test.go +++ b/tests/advanced_visibility_test.go @@ -22,7 +22,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -package visibility +package tests import ( "bytes" diff --git a/tests/namespace/namespace_delete_test.go b/tests/namespace_delete_test.go similarity index 99% rename from tests/namespace/namespace_delete_test.go rename to tests/namespace_delete_test.go index 5ffb7ef43b9..bed2f09abe9 100644 --- a/tests/namespace/namespace_delete_test.go +++ b/tests/namespace_delete_test.go @@ -22,7 +22,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -package namespace +package tests import ( "errors" diff --git a/tests/namespace/namespace_interceptor_test.go b/tests/namespace_interceptor_test.go similarity index 99% rename from tests/namespace/namespace_interceptor_test.go rename to tests/namespace_interceptor_test.go index d127b8d6cb3..e5c0c75f9f1 100644 --- a/tests/namespace/namespace_interceptor_test.go +++ b/tests/namespace_interceptor_test.go @@ -22,7 +22,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -package namespace +package tests import ( "testing" diff --git a/tests/nexus/nexus_api_test.go b/tests/nexus_api_test.go similarity index 99% rename from tests/nexus/nexus_api_test.go rename to tests/nexus_api_test.go index ba115d994d7..5589abd5786 100644 --- a/tests/nexus/nexus_api_test.go +++ b/tests/nexus_api_test.go @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -package nexus +package tests import ( "context" diff --git a/tests/nexus/nexus_endpoint_test.go b/tests/nexus_endpoint_test.go similarity index 99% rename from tests/nexus/nexus_endpoint_test.go rename to tests/nexus_endpoint_test.go index 49d7ba9ff64..683ecef7f78 100644 --- a/tests/nexus/nexus_endpoint_test.go +++ b/tests/nexus_endpoint_test.go @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -package nexus +package tests import ( "fmt" diff --git a/tests/nexus/nexus_test_base.go b/tests/nexus_test_base.go similarity index 99% rename from tests/nexus/nexus_test_base.go rename to tests/nexus_test_base.go index f0dc544d80c..a5b90889ddc 100644 --- a/tests/nexus/nexus_test_base.go +++ b/tests/nexus_test_base.go @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -package nexus +package tests import ( "context" diff --git a/tests/nexus/nexus_workflow_test.go b/tests/nexus_workflow_test.go similarity index 99% rename from tests/nexus/nexus_workflow_test.go rename to tests/nexus_workflow_test.go index 9e1adf516c8..ce1cb4932b0 100644 --- a/tests/nexus/nexus_workflow_test.go +++ b/tests/nexus_workflow_test.go @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -package nexus +package tests import ( "context" diff --git a/tests/update/reset_workflow_test.go b/tests/reset_workflow_test.go similarity index 99% rename from tests/update/reset_workflow_test.go rename to tests/reset_workflow_test.go index e9f5a265a4e..6f1be42d466 100644 --- a/tests/update/reset_workflow_test.go +++ b/tests/reset_workflow_test.go @@ -22,7 +22,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -package update +package tests import ( "bytes" diff --git a/tests/update/update_workflow_sdk_test.go b/tests/update_workflow_sdk_test.go similarity index 99% rename from tests/update/update_workflow_sdk_test.go rename to tests/update_workflow_sdk_test.go index 55431b6f823..d8cbb1a2669 100644 --- a/tests/update/update_workflow_sdk_test.go +++ b/tests/update_workflow_sdk_test.go @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -package update +package tests import ( "context" diff --git a/tests/update/update_workflow_suite_base.go b/tests/update_workflow_suite_base.go similarity index 97% rename from tests/update/update_workflow_suite_base.go rename to tests/update_workflow_suite_base.go index 0b8a780c742..b85f221213c 100644 --- a/tests/update/update_workflow_suite_base.go +++ b/tests/update_workflow_suite_base.go @@ -22,7 +22,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -package update +package tests import ( "context" @@ -42,6 +42,11 @@ type WorkflowUpdateBaseSuite struct { testcore.FunctionalSuite } +type updateResponseErr struct { + response *workflowservice.UpdateWorkflowExecutionResponse + err error +} + func (s *WorkflowUpdateBaseSuite) sendUpdateNoErrorWaitPolicyAccepted(tv *testvars.TestVars, updateID string) <-chan *workflowservice.UpdateWorkflowExecutionResponse { s.T().Helper() return s.sendUpdateNoErrorInternal(tv, updateID, &updatepb.WaitPolicy{LifecycleStage: enumspb.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED}) diff --git a/tests/update/update_workflow_test.go b/tests/update_workflow_test.go similarity index 99% rename from tests/update/update_workflow_test.go rename to tests/update_workflow_test.go index 6fa821193dc..e28adc2398f 100644 --- a/tests/update/update_workflow_test.go +++ b/tests/update_workflow_test.go @@ -22,7 +22,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -package update +package tests import ( "context" @@ -65,11 +65,6 @@ func TestUpdateWorkflowSuite(t *testing.T) { suite.Run(t, s) } -type updateResponseErr struct { - response *workflowservice.UpdateWorkflowExecutionResponse - err error -} - // TODO: extract sendUpdate* methods to separate package. func (s *UpdateWorkflowSuite) sendUpdate(ctx context.Context, tv *testvars.TestVars, updateID string) <-chan updateResponseErr { diff --git a/tests/visibility/workflow_visibility_test.go b/tests/workflow_visibility_test.go similarity index 99% rename from tests/visibility/workflow_visibility_test.go rename to tests/workflow_visibility_test.go index 540e75cf698..6eab3d80f83 100644 --- a/tests/visibility/workflow_visibility_test.go +++ b/tests/workflow_visibility_test.go @@ -22,7 +22,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -package visibility +package tests import ( "testing"