-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed tests running in Dev Container (Webhook and Release Test) #154
Comments
Thanks for the report! The issue with most (all?) of these tests is that they were originally written for NetBox's CI environment, in which there is no worker process running, but in the Nautobot dev environment we do have a worker. These tests place various jobs on the worker queue and expect the jobs to still be on the queue when checking later, but since we have an operational worker process, it is pulling the jobs off the queue and executing them immediately, causing the test to fail when it checks the queue and finds the jobs no longer present. This is absolutely a bug in the tests and is something we should fix. |
A quick way around this in the tests would be to have the test configuration use different Redis database numbers for tasks and caching (like 2 and 3 respectively)? At least when the tests run and publish things, it may prevent them from being picked up by any active workers using the default config values? |
@smk4664 Could you please test that out and see if that works for you? (Hint: |
I had to modify the |
Great! Passing in the test config to run the tests is the correct pattern anyhow! :) |
Environment
Steps to Reproduce
nautobot-server test
Expected Behavior
All Tests pass
Observed Behavior
Receiver Error and Failed Tests.
ERROR: test_webhooks_worker (nautobot.extras.tests.test_webhooks.WebhookTest)
FAIL: test_change_webhook_enqueued (nautobot.extras.tests.test_context_managers.web_request_contextTestCase)
FAIL: test_enqueue_webhook_create (nautobot.extras.tests.test_webhooks.WebhookTest)
FAIL: test_enqueue_webhook_delete (nautobot.extras.tests.test_webhooks.WebhookTest)
FAIL: test_enqueue_webhook_update (nautobot.extras.tests.test_webhooks.WebhookTest)
FAIL: test_failed_request (nautobot.core.tests.test_releases.GetReleasesTestCase)
The text was updated successfully, but these errors were encountered: