A race occurs today where the cleanup runs after the lease
has been deleted, making all the content and statuses
eligible for collection during the cleanup. There is a case
where a status could be listed but removed before the
abort is called. In this case, abort will return a not found
and the test cleanup should ignore it.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Allows the client to choose the context to finish the lease.
This allows the client to switch contexts when the main context
used to the create the lease may have been cancelled.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Let the test runners choose the namespaces and
wrap the contexts. This allows the test suite to create
multiple contexts without worrying about namespacing
or leasing in the contexts.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This ignore "not found" errors that may arise during test cleanup. Since
the goal is to make the content "not found", it is okay to skip them and
not fail the test.
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Add commit options which allow for setting labels on commit.
Prevents potential race between garbage collector reading labels
after commit and labels getting set.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>