rename function

This commit is contained in:
Sean Sullivan 2021-06-15 23:13:59 -07:00
parent 4432f51ac3
commit a3f3792743
3 changed files with 5 additions and 5 deletions

View File

@ -837,7 +837,7 @@ func TestApplyTaskWithDifferentInventoryAnnotation(t *testing.T) {
assert.Equal(t, tc.expectedEvents[i].Type, e.Type)
assert.Equal(t, tc.expectedEvents[i].ApplyEvent.Error.Error(), e.ApplyEvent.Error.Error())
}
actualUids := taskContext.AllResourceUIDs()
actualUids := taskContext.AppliedResourceUIDs()
assert.Equal(t, len(actualUids), 1)
})
}

View File

@ -52,7 +52,7 @@ func (p *PruneTask) Start(taskContext *taskrunner.TaskContext) {
// Create filter to prevent deletion of currently applied
// objects. Must be done here to wait for applied UIDs.
uidFilter := filter.CurrentUIDFilter{
CurrentUIDs: taskContext.AllResourceUIDs(),
CurrentUIDs: taskContext.AppliedResourceUIDs(),
}
p.Filters = append(p.Filters, uidFilter)
err := p.PruneOptions.Prune(p.Objects,

View File

@ -76,9 +76,9 @@ func (tc *TaskContext) AppliedResources() []object.ObjMetadata {
return all
}
// AllResourceUIDs returns a set with the UIDs of all the resources in the
// context.
func (tc *TaskContext) AllResourceUIDs() sets.String {
// AppliedResourceUIDs returns a set with the UIDs of all the
// successfully applied resources.
func (tc *TaskContext) AppliedResourceUIDs() sets.String {
uids := sets.NewString()
for _, ai := range tc.appliedResources {
uid := strings.TrimSpace(string(ai.uid))