File tree Expand file tree Collapse file tree 4 files changed +19
-5
lines changed
Expand file tree Collapse file tree 4 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -1314,13 +1314,10 @@ mod tests {
13141314 use tracing_test:: traced_test;
13151315
13161316 #[ tokio:: test]
1317- #[ ignore] // TODO - set an environment variable, or create a new config with dummy credentials
13181317 async fn test_missing_clickhouse ( ) {
13191318 // This config file requires ClickHouse, so it should fail if no ClickHouse URL is provided
13201319 let err = ClientBuilder :: new ( ClientBuilderMode :: EmbeddedGateway {
1321- config_file : Some ( PathBuf :: from (
1322- "../../examples/haiku-hidden-preferences/config/tensorzero.toml" ,
1323- ) ) ,
1320+ config_file : Some ( PathBuf :: from ( "tests/test_config.toml" ) ) ,
13241321 clickhouse_url : None ,
13251322 timeout : None ,
13261323 verify_credentials : true ,
@@ -1330,7 +1327,7 @@ mod tests {
13301327 . expect_err ( "ClientBuilder should have failed" ) ;
13311328 let err_msg = err. to_string ( ) ;
13321329 assert ! (
1333- err . to_string ( ) . contains( "Missing ClickHouse URL " ) ,
1330+ err_msg . contains( "Missing environment variable TENSORZERO_CLICKHOUSE_URL " ) ,
13341331 "Bad error message: {err_msg}"
13351332 ) ;
13361333 }
Original file line number Diff line number Diff line change 1+ You are a helpful assistant.
Original file line number Diff line number Diff line change 1+ {{ user_text }}
Original file line number Diff line number Diff line change 1+ # Test configuration for testing ClickHouse requirement
2+ # This config explicitly enables observability, which requires ClickHouse
3+
4+ [gateway .observability ]
5+ enabled = true
6+
7+ # Minimal function definition for a valid config
8+ [functions .test_function ]
9+ type = " chat"
10+
11+ [functions .test_function .variants .test_variant ]
12+ type = " chat_completion"
13+ model = " openai::gpt-4o-mini-2024-07-18"
14+ system_template = " templates/system_template.minijinja"
15+ user_template = " templates/user_template.minijinja"
You can’t perform that action at this time.
0 commit comments