mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-29 19:25:49 +00:00
Improve the UT coverage for pkg/label
Improve the UT coverage for pkg/label Fixes #6259 Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
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