Download this file
| 1 | package console |
| 2 | |
| 3 | import "testing" |
| 4 | |
| 5 | // Region HA §5.2 (L8), stage B Task 10: ConfigureClaimRuntime gives the |
| 6 | // create door the executor chooser only with RegionHA on. Off, create is |
| 7 | // today's (no Executors). |
| 8 | func TestCreateDoorUsesTheChooserOnlyWithRegionHAOn(t *testing.T) { |
| 9 | off := newClaimCase(t) |
| 10 | if off.srv.cfg.ClaimAuthority.Executors != nil { |
| 11 | t.Fatal("a chooser with region HA off: create would change") |
| 12 | } |
| 13 | on := newClaimCaseWith(t, func(c *Config) { c.RegionHA = true }) |
| 14 | x := on.srv.cfg.ClaimAuthority.Executors |
| 15 | if x == nil || x.Edges == nil || x.Loads == nil || x.Now == nil || x.HomeName != on.srv.cfg.HomeRegion || x.SecretsKeyFP != on.srv.expectedSecretsFP() { |
| 16 | t.Fatalf("chooser with region HA on: %+v", x) |
| 17 | } |
| 18 | if x.Directory.Store == nil { |
| 19 | t.Fatal("the chooser reads no roster") |
| 20 | } |
| 21 | } |
| 22 | |