test: drive catalog in ns rejection test

Use the actual catalog resolver, not the mock to assert the correct
behaviour with a populated catalog.
pull/24376/head
Dom Dwyer 2023-01-26 17:55:39 +01:00
parent 0aa5469ac6
commit 8140313775
No known key found for this signature in database
GPG Key ID: E4C40DBD9157879A
1 changed files with 4 additions and 3 deletions

View File

@ -153,7 +153,8 @@ mod tests {
use super::*;
use crate::{
namespace_cache::MemoryNamespaceCache, namespace_resolver::mock::MockNamespaceResolver,
namespace_cache::MemoryNamespaceCache,
namespace_resolver::{mock::MockNamespaceResolver, NamespaceSchemaResolver},
};
/// Common retention period value we'll use in tests
@ -299,7 +300,7 @@ mod tests {
// First drive the population of the catalog
let creator = NamespaceAutocreation::new(
MockNamespaceResolver::default().with_mapping(ns.clone(), NamespaceId::new(1)),
NamespaceSchemaResolver::new(Arc::clone(&catalog), Arc::clone(&cache)),
Arc::clone(&cache),
Arc::clone(&catalog),
TopicId::new(42),
@ -314,7 +315,7 @@ mod tests {
// Now try in "reject" mode.
let creator = NamespaceAutocreation::new(
MockNamespaceResolver::default().with_mapping(ns.clone(), NamespaceId::new(1)),
NamespaceSchemaResolver::new(Arc::clone(&catalog), Arc::clone(&cache)),
cache,
Arc::clone(&catalog),
TopicId::new(42),