Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: troychiu <[email protected]>
  • Loading branch information
troychiu committed Nov 6, 2024
1 parent 50ee9bd commit 2c1010d
Showing 1 changed file with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func TestValidateNamedEntityUpdateRequest(t *testing.T) {
},
}))
assert.Equal(t, codes.InvalidArgument, ValidateNamedEntityUpdateRequest(&admin.NamedEntityUpdateRequest{
ResourceType: core.ResourceType_LAUNCH_PLAN,
ResourceType: core.ResourceType_DATASET,
Id: &admin.NamedEntityIdentifier{
Project: "project",
Domain: "domain",
Expand Down Expand Up @@ -141,6 +141,30 @@ func TestValidateNamedEntityUpdateRequest(t *testing.T) {
State: admin.NamedEntityState_NAMED_ENTITY_ARCHIVED,
},
}))

assert.Nil(t, ValidateNamedEntityUpdateRequest(&admin.NamedEntityUpdateRequest{
ResourceType: core.ResourceType_LAUNCH_PLAN,
Id: &admin.NamedEntityIdentifier{
Project: "project",
Domain: "domain",
Name: "name",
},
Metadata: &admin.NamedEntityMetadata{
Description: "description",
},
}))

assert.Nil(t, ValidateNamedEntityUpdateRequest(&admin.NamedEntityUpdateRequest{
ResourceType: core.ResourceType_LAUNCH_PLAN,
Id: &admin.NamedEntityIdentifier{
Project: "project",
Domain: "domain",
Name: "name",
},
Metadata: &admin.NamedEntityMetadata{
State: admin.NamedEntityState_NAMED_ENTITY_ARCHIVED,
},
}))
}

func TestValidateNamedEntityListRequest(t *testing.T) {
Expand Down

0 comments on commit 2c1010d

Please sign in to comment.