From 139a1b0b7e4ac3f700b1b8715f9c26bfd8d41b36 Mon Sep 17 00:00:00 2001 From: featherchen Date: Thu, 7 Nov 2024 19:07:37 -0800 Subject: [PATCH] feat(test): Get integration test Signed-off-by: featherchen --- flyteadmin/tests/task_execution_test.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/flyteadmin/tests/task_execution_test.go b/flyteadmin/tests/task_execution_test.go index e380104684c..597660237a4 100644 --- a/flyteadmin/tests/task_execution_test.go +++ b/flyteadmin/tests/task_execution_test.go @@ -45,6 +45,31 @@ var taskExecutionIdentifier = &core.TaskExecutionIdentifier{ RetryAttempt: 1, } +func TestGetWorkflowExecutions(t *testing.T) { + truncateAllTablesForTestingOnly() + populateWorkflowExecutionsForTestingOnly() + + ctx := context.Background() + client, conn := GetTestAdminServiceClient() + defer conn.Close() + + resp, err := client.GetTask(ctx, &admin.ObjectGetRequest{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: "project1", + Domain: "domain1", + Name: "name1", + }, + }) + + assert.Nil(t, err) + assert.Equal(t, resp.Id.Project, "project1") + assert.Equal(t, resp.Id.Domain, "domain1") + assert.Equal(t, resp.Id.Name, "name1") + assert.Equal(t, resp.Id.Version, "version1") + +} + func createTaskAndNodeExecution( ctx context.Context, t *testing.T, client service.AdminServiceClient, conn *grpc.ClientConn, occurredAtProto *timestamp.Timestamp) {