Commit Graph

20 Commits

Author SHA1 Message Date
gkoutsou
255db7aab1
Add ENVs using NewTestDockerCluster (#27457)
* Add ENVs using NewTestDockerCluster

Currently NewTestDockerCluster had no means for setting any
environment variables. This makes it tricky to create test
for functionality that require thems, like having to set
AWS environment variables.

DockerClusterOptions now exposes an option to pass extra
enviroment variables to the containers, which are appended
to the existing ones.

* adding changelog

* added test case for setting env variables to containers

* fix changelog typo; env name

* Update changelog/27457.txt

Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>

* adding the missing copyright

---------

Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>
2024-08-16 13:18:47 -07:00
Peter Wilson
1af9819744
add iptables (#28031) 2024-08-08 11:59:26 +00:00
Rachel Culpepper
a1d72f2426
Vault-22903: add option to disable TLS in test clusters (#25764)
* add option to disable TLS in test clusters

* add nil check

* change nil check

* fix cluster_addr
2024-03-11 11:59:36 -05:00
divyaac
c467620740
Redacted Information With Valid Token (#25735) 2024-03-01 13:20:31 -05:00
Nick Cabatoff
b5cbc8b986
Add replication.SetCorePerf to create a ReplicationSet using NewTestCluster (#25381) 2024-02-16 09:00:47 -05:00
Josh Black
ef26498e9c
Implement raft-wal (#21460)
* Implement raft-wal

* go mod tidy

* add metrics, fix a panic

* fix the panic for real this time

* PR feedback

* refactor tests to use a helper and reduce duplication

* add a test to verify we don't use raft-wal if raft.db exists

* add config to enable the verifier

* add tests for parsing verification intervals

* run the verifier in the background

* wire up the verifier

* go mod tidy

* refactor config parsing

* remove unused function

* trying to get the verifier working

* wire up some more verifier bits

* sorted out an error, added a new test, lots of debug logging that needs to come out

* fix a bug and remove all the debugging statements

* make sure we close raft-wal stablestore too

* run verifier tests for both boltdb and raft-wal

* PR feedback

* Vault 20270 docker test raft wal (#24463)

* adding a migration test from boltdb to raftwal and back
adding a migration test using snapshot restore

* feedback

* Update physical/raft/raft.go

Co-authored-by: Paul Banks <pbanks@hashicorp.com>

* PR feedback

* change verifier function

* make this shorter

* add changelog

* Fix Close behavior

* make supporting empty logs more explicit

* add some godocs

---------

Co-authored-by: hamid ghaf <hamid@hashicorp.com>
Co-authored-by: Hamid Ghaf <83242695+hghaf099@users.noreply.github.com>
Co-authored-by: Paul Banks <pbanks@hashicorp.com>
2024-01-25 10:08:50 -08:00
Rachel Culpepper
73df860e90
Vault-14651: add function for restarting cluster nodes (#24335)
* add function for restarting cluster nodes

* fix import
2023-12-01 22:07:44 +00:00
Nick Cabatoff
22a2e74fcc
Fix error not being handled when creating a docker cluster. (#24136) 2023-11-15 14:09:06 +00: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
divyaac
d5b29f697a
Chroot Listener (#22304)
* Initial oss-patch apply

* Added changelog

* Renamed changelog txt

* Added the imports to the handler file

* Added a check that no two ports are the same, and modified changelog

* Edited go sum entry

* Tidy up using go mod

* Use strutil instead

* Revert go sum and go mod

* Revert sdk go sum

* Edited go.sum to before

* Edited go.sum again to initial

* Revert changes
2023-08-14 12:35:34 -07:00
Bianca Moreira
4c1a7b53d3
Add high privilege namespace (#21215) 2023-07-06 09:51:43 +02:00
Hamid Ghaf
288399f228
OSS portion of additional DR failover tests (#20842) 2023-05-30 08:41:33 -07:00
Nick Cabatoff
356b3899bb
Cluster test helper improvements (#20424) 2023-05-24 20:21:10 +00:00
Hamid Ghaf
f8ccaac856
adding support for four cluster docker based test scenario (#20492) 2023-05-03 10:49:45 -07:00
Alexander Scheel
a5bca6a122
Add dns resolver to PKI Binary Cluster (#20485)
* Export DockerAPI for use by other consumers

As usage of DockerCluster gets more advanced, some users may want to
interact with the container nodes of the cluster. While, if you already
have a DockerAPI instance lying around you can reuse that safely, for
use cases where an existing e.g., docker/testhelpers's runner instance
is not available, reusing the existing cluster's DockerAPI is easiest.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add ability to exec commands without runner

When modifying DockerTestCluster's containers manually, we might not
have a Runner instance; instead, expose the ability to run commands via
a DockerAPI instance directly, as they're awfully convenient.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add DNS resolver into ACME tests

This updates the pkiext_binary tests to use an adjacent DNS resolver,
allowing these tests to eventually be extended to solve DNS challenges,
as modifying the /etc/hosts file does not allow this.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Fix loading DNS resolver onto network

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Fix bug with DNS configuration validation

Both conditionals here were inverted: address being empty means a bad
specification was given, and the parse being nil means that it was not a
valid IP address.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Fix specifying TXT records, allow removing records

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-05-03 17:32:39 +00:00
Nick Cabatoff
781d43e91c
Simple perf replication test using docker containers (#20393) 2023-04-28 19:43:30 +00:00
Nick Cabatoff
a65597aa59
Add support for restarting docker nodes, and for providing args (#20409) 2023-04-28 14:03:14 -04:00
Nick Cabatoff
f4c881726f
Don't require every test to specify a VaultLicense field (#20372) 2023-04-26 18:39:48 +00:00
Nick Cabatoff
445e2e91c6
Docker testing: handle licensing, different images per node (#20347) 2023-04-25 17:11:46 -04:00
Nick Cabatoff
2f0929f3ab
Add support for docker testclusters (#20247) 2023-04-24 14:25:50 -04:00