Closed pamelafox closed 1 month ago
This looks suspicious: https://github.com/Azure-Samples/rag-postgres-openai-python/blob/0cf5e354b0e8e9723920887b769d8649730baa25/tests/conftest.py#L46
Try to remove clear or just write to os.environ. Playwright needs good environment variables, and you fully clear them probably.
Ah, interesting- I often use clear=True so that we don't have to overspecify every single environment variable, and can rely on unset env variables taking on their default values in configuration. I don't think it's an issue in this repo, but it was an issue in another repo. Anyways, I just did a test CI removing clear=True for this repo, and all passed! I can make sure to only clear the app's env variables in future to avoid trampling on playwright vars. Thank you!
Version
1.45.1
Steps to reproduce
See the CI here: https://github.com/Azure-Samples/rag-postgres-openai-python/actions/runs/10189786904/job/28188453780?pr=66
Here's the workflow file: https://github.com/Azure-Samples/rag-postgres-openai-python/actions/runs/10189786904/workflow?pr=66
The playwright tests run fine in Mac, but they fail in the Windows runner.
We'll go ahead and disable them in main, but you can replicate by using our code at that point in time in a fork: commit 0cf5e354b0e8e9723920887b769d8649730baa25 in https://github.com/john0isaac/rag-postgres-openai-python/tree/add-playwright-tests
Expected behavior
We expect tests to pass.
Actual behavior
We see this error:
Additional context
No response
Environment