Commit 344fb8a
authored
fix: pass in env vars for cli tests (#2060)
A bug was introduced in #1949 which was not injecting env vars for
`baml-cli test`
This PR fixes that by passing in the environment variables.
Fixes #2051
<img width="880" alt="image"
src="https://github.com/user-attachments/assets/6df90bcc-4ef7-4d7c-9d68-e938957ef0e3"
/>
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Fixes bug in `baml-cli test` by passing environment variables to
`BamlRuntime` and `TestExecutor`.
>
> - **Behavior**:
> - Fixes bug in `baml-cli test` by passing environment variables to
`BamlRuntime::from_directory` and `TestExecutor::cli_run_tests`.
> - Collects environment variables into `HashMap` and passes them to
`BamlRuntime` and `TestExecutor`.
> - **Functions**:
> - Updates `BamlRuntime::from_directory` in `lib.rs` to accept
`env_vars`.
> - Updates `TestExecutor::cli_run_tests` in `test_executor/mod.rs` to
accept `env_vars`.
> - **Misc**:
> - Removes redundant logging of environment variables in `lib.rs`.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup>
for db380e2. You can
[customize](https://app.ellipsis.dev/BoundaryML/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->1 parent 687404f commit 344fb8a
3 files changed
Lines changed: 7 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
415 | 414 | | |
416 | 415 | | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | 416 | | |
423 | 417 | | |
424 | 418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| 184 | + | |
183 | 185 | | |
184 | 186 | | |
185 | 187 | | |
| |||
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| 224 | + | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| |||
233 | 236 | | |
234 | 237 | | |
235 | 238 | | |
236 | | - | |
| 239 | + | |
237 | 240 | | |
238 | 241 | | |
239 | 242 | | |
| |||
0 commit comments