mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-21 14:46:07 +00:00
Merge pull request #6289 from ywk253100/230519_ut_label
Improve the UT coverage for pkg/label
This commit is contained in:
@@ -76,5 +76,4 @@ func (a *PVCAction) Execute(item runtime.Unstructured, backup *v1.Backup) (runti
|
||||
}
|
||||
|
||||
return &unstructured.Unstructured{Object: pvcMap}, []velero.ResourceIdentifier{pv}, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -47,3 +47,13 @@ func TestGetValidLabelName(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewSelectorForBackup(t *testing.T) {
|
||||
selector := NewSelectorForBackup("my-backup")
|
||||
assert.Equal(t, "velero.io/backup-name=my-backup", selector.String())
|
||||
}
|
||||
|
||||
func TestNewListOptionsForBackup(t *testing.T) {
|
||||
option := NewListOptionsForBackup("my-backup")
|
||||
assert.Equal(t, "velero.io/backup-name=my-backup", option.LabelSelector)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user