* Builds a fake enabled environment for self-managed and impersonation.
({
httpAddress,
status,
}: {
httpAddress: string;
status: EnvironmentStatus;
})
| 434 | */ |
| 435 | |
| 436 | function buildFakeEnabledEnvironment({ |
| 437 | httpAddress, |
| 438 | status, |
| 439 | }: { |
| 440 | httpAddress: string; |
| 441 | status: EnvironmentStatus; |
| 442 | }): EnabledEnvironment { |
| 443 | return { |
| 444 | httpAddress, |
| 445 | sqlAddress: "", |
| 446 | resolvable: true, |
| 447 | // A made up enabled at time only used during impersonation and self-managed, |
| 448 | // since we don't know when the environment was enabled. |
| 449 | enabledAt: fakeEnabledAt.toString(), |
| 450 | state: "enabled", |
| 451 | status, |
| 452 | errors: [], |
| 453 | }; |
| 454 | } |
| 455 | |
| 456 | const selectVersionQuery = sql`SELECT mz_version()`.compile(queryBuilder); |
| 457 |
no outgoing calls
no test coverage detected