MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / test_internal_users_cluster

Function test_internal_users_cluster

src/environmentd/tests/sql.rs:1973–1989  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1971#[mz_ore::test]
1972#[allow(clippy::disallowed_methods)]
1973fn test_internal_users_cluster() {
1974 let server = test_util::TestHarness::default().start_blocking();
1975
1976 for (user, expected_cluster) in INTERNAL_USER_NAME_TO_DEFAULT_CLUSTER.iter() {
1977 let mut internal_client = server
1978 .pg_config_internal()
1979 .user(user)
1980 .connect(postgres::NoTls)
1981 .unwrap();
1982
1983 let cluster = internal_client
1984 .query_one("SHOW CLUSTER", &[])
1985 .unwrap()
1986 .get::<_, String>(0);
1987 assert_eq!(expected_cluster, &cluster);
1988 }
1989}
1990
1991// Tests that you can have simultaneous connections on the internal and external ports without
1992// crashing

Callers

nothing calls this directly

Calls 7

start_blockingMethod · 0.80
unwrapMethod · 0.80
pg_config_internalMethod · 0.80
iterMethod · 0.45
connectMethod · 0.45
userMethod · 0.45
query_oneMethod · 0.45

Tested by

no test coverage detected