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) {