(t *testing.T)
| 1052 | } |
| 1053 | |
| 1054 | func (s *restartableTestServer) startWithFirstUser(t *testing.T) (client *codersdk.Client, firstUser codersdk.CreateFirstUserResponse) { |
| 1055 | t.Helper() |
| 1056 | s.mu.Lock() |
| 1057 | defer s.mu.Unlock() |
| 1058 | |
| 1059 | if s.closer != nil || s.api != nil { |
| 1060 | t.Fatal("server already started, close must be called first") |
| 1061 | } |
| 1062 | // This creates it's own TCP listener unfortunately, but it's not being |
| 1063 | // used in this test. |
| 1064 | client, s.closer, s.api, firstUser = coderdenttest.NewWithAPI(t, s.options) |
| 1065 | |
| 1066 | // Never add the first user or license on subsequent restarts. |
| 1067 | s.options.DontAddFirstUser = true |
| 1068 | s.options.DontAddLicense = true |
| 1069 | |
| 1070 | return client, firstUser |
| 1071 | } |
| 1072 | |
| 1073 | // Test_CoordinatorRollingRestart tests that two peers can maintain a connection |
| 1074 | // without forgetting about each other when a HA coordinator does a rolling |
no test coverage detected