Skip to content

Commit

Permalink
feat(test): Get integration test
Browse files Browse the repository at this point in the history
Signed-off-by: featherchen <[email protected]>
  • Loading branch information
featherchen committed Nov 8, 2024
1 parent 5341abf commit 139a1b0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions flyteadmin/tests/task_execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 139a1b0

Please sign in to comment.