From 809a3ad0b426a479bb4e5090a32a9cc015e78c99 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 8 Dec 2022 15:27:13 +0200 Subject: [PATCH] fix passing 'testing_mode' through neon_local --- control_plane/src/local_env.rs | 3 +++ control_plane/src/pageserver.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/control_plane/src/local_env.rs b/control_plane/src/local_env.rs index ac4ebd0d1e..3d750fbac7 100644 --- a/control_plane/src/local_env.rs +++ b/control_plane/src/local_env.rs @@ -156,6 +156,8 @@ pub struct PageServerConf { // jwt auth token used for communication with pageserver pub auth_token: String, + + pub testing_mode: bool, } impl Default for PageServerConf { @@ -166,6 +168,7 @@ impl Default for PageServerConf { listen_http_addr: String::new(), auth_type: AuthType::Trust, auth_token: String::new(), + testing_mode: false, } } } diff --git a/control_plane/src/pageserver.rs b/control_plane/src/pageserver.rs index d845c9d7e9..bbec894ca7 100644 --- a/control_plane/src/pageserver.rs +++ b/control_plane/src/pageserver.rs @@ -141,6 +141,9 @@ impl PageServerNode { init_config_overrides.push(&listen_http_addr_param); init_config_overrides.push(&listen_pg_addr_param); init_config_overrides.push(&broker_endpoints_param); + if self.env.pageserver.testing_mode { + init_config_overrides.push("testing_mode=true"); + } if let Some(broker_etcd_prefix_param) = broker_etcd_prefix_param.as_deref() { init_config_overrides.push(broker_etcd_prefix_param);