Object Lifecycle Sequence Testing Utilities
Problem Statement
Most of the time when testing the state of an API object the lineage of changes to it's observed (and sometimes declared) state are predictable and reproducible in a testing environment.
The purpose of this task is to add high level functionality that allows the caller to write very simple and generic tests which verify the sequence of lifecycle events for an object.
Acceptance Criteria
- [ ] when writing tests for controllers I can describe the entire series of lifecycle events that are expected to occur for a resource as it's being processed by its controller(s) as a high level data structure
- [ ] it's possible with the testing structure to optionally enable non-strict sequence wherein the events that occur simply need to be in the right order, but other undefined events are permitted between the defined ones
- [ ] this testing functionality integrates well with
github.com/stretchr/testifytesting functions
Can we ensure we don't miss any state change in an object if it switches states too fast?
Can we ensure we don't miss any state change in an object if it switches states too fast?
Yes it should be feasible to capture all state changes along the resource version lineage.