Commit Graph

7 Commits

Author SHA1 Message Date
Christopher Swenson
961bf20bdb
Use enumer to generate String() methods for most enums (#25705)
We have many hand-written String() methods (and similar) for enums.
These require more maintenance and are more error-prone than using
automatically generated methods. In addition, the auto-generated
versions can be more efficient.

Here, we switch to using https://github.com/loggerhead/enumer, itself
a fork of https://github.com/diegostamigni/enumer, no longer maintained,
and a fork of the mostly standard tool
https://pkg.go.dev/golang.org/x/tools/cmd/stringer.
We use this fork of enumer for Go 1.20+ compatibility and because
we require the `-transform` flag to be able to generate
constants that match our current code base.

Some enums were not targeted for this change:
2024-04-17 11:14:14 -07:00
Nick Cabatoff
1b8606d9ec
Minor improvements to test cluster libraries (#25329)
Add WaitForMatchingMerkleRootsClients and Clients to sdk testcluster.  Fix internal TestCluster.SetRootToken, which wasn't updating the builtin clients' token.
2024-02-09 09:45:43 -05:00
Nick Cabatoff
423b58c90b
Simplify raft cluster address management in tests (#24560) 2023-12-18 09:42:23 -05:00
Nick Cabatoff
b8f531142b
Use our heartbeat echo RPCs to estimate clock skew, expose it in status APIs (#24343) 2023-12-04 12:04:38 -05:00
Paul Banks
0fa36a36ae
Prevent split-brain active node writes when using Consul (#23013)
* Add test to demonstrate a split-brain active node when using Consul

* Add Consul session check to prevent split-brain updates

* It's not right

Co-authored-by: Josh Black <raskchanky@gmail.com>

---------

Co-authored-by: Josh Black <raskchanky@gmail.com>
2023-09-22 16:16:01 +01:00
Nick Cabatoff
356b3899bb
Cluster test helper improvements (#20424) 2023-05-24 20:21:10 +00:00
Nick Cabatoff
980f1e0aae
Add tests based on vault binary (#20224)
First steps towards docker-based tests: tests using vault binary in -dev or -dev-three-node modes.
2023-04-24 09:57:37 -04:00