consul/test-integ/peering_commontopo
Nick Irvine cd3fc9e1d0
add peering_commontopo tests [NET-3700] (#17951)
Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>
Co-authored-by: R.B. Boyer <rb@hashicorp.com>
Co-authored-by: Freddy <freddygv@users.noreply.github.com>
Co-authored-by: NiniOak <anita.akaeze@hashicorp.com>
2023-07-18 16:41:30 -07:00
..
README.md add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
ac1_basic_test.go add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
ac2_disco_chain_test.go add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
ac3_service_defaults_upstream_test.go add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
ac4_proxy_defaults_test.go add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
ac5_1_no_svc_mesh_test.go add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
ac5_2_pq_failover_test.go add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
ac6_failovers_test.go add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
ac7_1_rotate_gw_test.go add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
ac7_2_rotate_leader_test.go add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
asserter.go add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
commontopo.go add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00
sharedtopology_test.go add peering_commontopo tests [NET-3700] (#17951) 2023-07-18 16:41:30 -07:00

README.md

peering_commontopo

These peering tests all use a commonTopo (read: "common topology") to enable sharing a deployment of a Consul. Sharing a deployment of Consul cuts down on setup time.

This is only possible if two constraints are followed:

  • setup() phase must ensure that any resources added to the topology cannot interfere with other tests. Principally by prefixing.
  • test() phase must be "passive" and not mutate the topology in any way that would interfere with other tests.

Some of these tests do mutate in their test() phase, and while they use commonTopo for the purpose of code sharing, they are not included in the "shared topo" tests in all_sharedtopo_test.go.

Tests that are "shared topo" can also be run in an independent manner, gated behind the -no-reuse-common-topo flag. The same flag also prevents the shared topo suite from running. So go test . (without the flag) runs all shared topo-capable tests in shared topo mode, as well as shared topo-incapable tests; and go test -no-reuse-common-topo runs all shared topo-capable tests individidually, as well as the shared topo-incapable tests. Mostly this is so that when working on a single test, you don't also need to run other tests, but by default when running go test . the usual way, you run all tests in the fastest way.