Skip to content

Commit 0939a5c

Browse files
committed
test(runner-configs): assert envoy protocol version
1 parent b69ce64 commit 0939a5c

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

engine/packages/engine/tests/runner/api_runner_configs_list.rs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,49 @@ fn list_runner_configs_multiple_dcs() {
199199
});
200200
}
201201

202+
#[test]
203+
fn list_runner_configs_includes_envoy_protocol_version() {
204+
common::run(common::TestOpts::new(1), |ctx| async move {
205+
let (namespace, _, envoy) = common::setup_test_namespace_with_envoy(ctx.leader_dc()).await;
206+
let datacenter_name = ctx
207+
.leader_dc()
208+
.config
209+
.dc_name()
210+
.expect("dc name should exist")
211+
.to_string();
212+
213+
let response = common::api::public::runner_configs_list(
214+
ctx.leader_dc().guard_port(),
215+
rivet_api_types::runner_configs::list::ListQuery {
216+
namespace,
217+
runner_names: None,
218+
runner_name: vec![envoy.pool_name().to_string()],
219+
variant: None,
220+
limit: None,
221+
cursor: None,
222+
},
223+
)
224+
.await
225+
.expect("failed to list runner configs");
226+
227+
let runner = response
228+
.runner_configs
229+
.get(envoy.pool_name())
230+
.expect("runner config should exist");
231+
let datacenter_runner = runner
232+
.datacenters
233+
.get(&datacenter_name)
234+
.expect("runner config should exist in the envoy datacenter");
235+
236+
assert_eq!(
237+
datacenter_runner.protocol_version,
238+
Some(common::test_envoy::PROTOCOL_VERSION),
239+
);
240+
241+
envoy.shutdown().await;
242+
});
243+
}
244+
202245
// MARK: Filtering tests
203246

204247
#[test]

0 commit comments

Comments
 (0)