Commit Graph

2 Commits (eca5b33a78f6760ccc99a824f697a1e8aa8bc144)

Author SHA1 Message Date
James Tucker eca5b33a78
tstest: add a helper for reproducable random seeds
We recently ran across a case of flaky tests that were seeding the
math/rand package and using that to generate data. The tests were
flaking on specific random values that were difficult to reproduce. If
the test had been using a helper like this, the flaky cases could have
been reliably reproduced.

Signed-off-by: James Tucker <james@tailscale.com>
2023-05-10 15:30:55 -07:00
Maisem Ali b9ebf7cf14 tstest: add method to Replace values for tests
We have many function pointers that we replace for the duration of test and
restore it on test completion, add method to do that.

Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-03-03 17:02:33 -08:00