check for conflicts on tombstone collections (#1927)

## Description

Ensure that we do not generate both a regular
collection and a tombstone for the same id.

## Does this PR need a docs update or release note?

- [x]  No 

## Type of change

- [x] 🐹 Trivial/Minor

## Issue(s)

* #1923

## Test Plan

- [x] 💚 E2E
This commit is contained in:
Keepers 2022-12-23 13:38:16 -07:00 committed by GitHub
parent 9e9cb43b58
commit b575f2ff68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,7 +141,12 @@ func filterContainersAndFillCollections(
for id, p := range tombstones {
service, err := createService(qp.Credentials)
if err != nil {
errs = support.WrapAndAppend(qp.ResourceOwner, err, errs)
errs = support.WrapAndAppend(p, err, errs)
continue
}
if collections[id] != nil {
errs = support.WrapAndAppend(p, errors.New("conflict: tombstone exists for a live collection"), errs)
continue
}