package console import "testing" // Region HA ยง5.2 (L8), stage B Task 10: ConfigureClaimRuntime gives the // create door the executor chooser only with RegionHA on. Off, create is // today's (no Executors). func TestCreateDoorUsesTheChooserOnlyWithRegionHAOn(t *testing.T) { off := newClaimCase(t) if off.srv.cfg.ClaimAuthority.Executors != nil { t.Fatal("a chooser with region HA off: create would change") } on := newClaimCaseWith(t, func(c *Config) { c.RegionHA = true }) x := on.srv.cfg.ClaimAuthority.Executors if x == nil || x.Edges == nil || x.Loads == nil || x.Now == nil || x.HomeName != on.srv.cfg.HomeRegion || x.SecretsKeyFP != on.srv.expectedSecretsFP() { t.Fatalf("chooser with region HA on: %+v", x) } if x.Directory.Store == nil { t.Fatal("the chooser reads no roster") } }