Skip to content

Commit c3aa1d9

Browse files
author
Arvind Thirumurugan
committed
fix drain UTs
1 parent 0d5ea43 commit c3aa1d9

2 files changed

Lines changed: 232 additions & 103 deletions

File tree

tools/draincluster/drain/drain.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ func generateResourceIdentifierKey(r placementv1beta1.ResourceIdentifier) string
198198
if len(r.Group) == 0 && len(r.Namespace) == 0 {
199199
return fmt.Sprintf(resourceIdentifierKeyFormat, "''", r.Version, r.Kind, "''", r.Name)
200200
}
201+
if len(r.Group) == 0 {
202+
return fmt.Sprintf(resourceIdentifierKeyFormat, "''", r.Version, r.Kind, r.Namespace, r.Name)
203+
}
201204
if len(r.Namespace) == 0 {
202205
return fmt.Sprintf(resourceIdentifierKeyFormat, r.Group, r.Version, r.Kind, "''", r.Name)
203206
}

0 commit comments

Comments
 (0)