8 Commits

Author SHA1 Message Date
Madhav Jivrajani
4fa07a1c8a tests/robustness: make merging histories work on []PersistedEvent
Event histories after merging serve as an authorotative list of
events that can be seen as ones persisted by etcd, we don't need
PrevValue as part of it.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2024-02-14 15:44:08 +05:30
Madhav Jivrajani
9aad6700d5 tests/robustness: add robustness test for watch with PrevKV()
Kubernetes relies on the PrevKV() option in the watches it opens
against etcd. This commit adds a robustness test to validate the
same.

A watch response returned with PrevKV() is valid if:
The value in current event's prevKV matches the previous
event's value of the same key if this is not a create event.

There are cases where there can be a prevKV for a create event
as well, for example if a watch is opened after the key is creatd.
Since we don't simulate for that, we don't check for that.

Further, this adjusts revision numbers such that we can successfully create
a new replay. Needed now since we will have unit tests with
and without PrevKV co-existing and we requite creation of a
new replay everytime we validate PrevKV.

We also regenerate test data with so that prevKV exists in it

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2024-02-13 22:55:57 +05:30
Madhav Jivrajani
f0f4e8a4e8 tests/robustness: fix out of index panic in model replay
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2024-02-01 16:14:35 +05:30
Wei Fu
07effc4d0a *: fix revive linter
Remove old revive_pass in the bash scripts and migirate the revive.toml
into golangci linter_settings.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-24 14:21:11 +08:00
Marek Siarkowicz
09c462e2ea tests/robustness: Add resumable validation and improve reliable validation
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-26 12:12:39 +02:00
Marek Siarkowicz
f7831e2607 tests/robustness: Move key into dedicated options to allow to implement proper ranges
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-22 18:27:54 +02:00
Marek Siarkowicz
3f09a51c60 tests/robustness: Make watch event independent from etcd operation
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-22 15:43:27 +02:00
Marek Siarkowicz
1663600bec tests/robustness: Validate stale get requests by replaying etcd state
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-19 14:17:38 +02:00