Add skip_localhost mark, skip shutdown on local#614
Conversation
…own command Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage); effort from diff stats (20+1 LOC, 3 files); LLM: Adds a pytest mark to skip destructive shutdown commands on localhost, improving local developer experience in the test framework (conftest/ini changes). If a label is wrong, remove it manually and ping |
Signed-off-by: PatersonProjects <keldonhoff@gmail.com> # Conflicts: # documentdb_tests/conftest.py # documentdb_tests/pytest.ini
Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
This reverts commit 014f2bc. Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
This reverts commit 51a482a. Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
…-tests Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
|
|
||
| Tests marked 'skip_localhost' are skipped when their target connects to a | ||
| localhost server -- a safety guard for destructive commands (e.g. shutdown) | ||
| that behave differently from a local client. |
There was a problem hiding this comment.
Can you remind me what's the behavior on local host what is behavior on remove host?
CI also skips it:
skip_localhost:
Total: 1
Passed: 0 (0.0%)
Failed: 0
Skipped: 1
Then when will we run this?
There was a problem hiding this comment.
Sorry, this came about as a misunderstanding on my part of how Docker was being run in CI, thank you for catching this. The goal is that it is skipped on local runs and passes on remote runs, as if the test ever fails it kills the connection and ruins the whole test run. I have made this earlier change to be a fallback and introduced a new check that allows CI to run the test.
Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
…cts/functional-tests into shutdown_smoke_fix Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
|
…-tests Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
Updated to use the new preconditions, which also helps fix the open gate. Updated documentation and descriptions |
There was a problem hiding this comment.
Were subtract related files unintentionally added?
This PR changes the contest and ini to add the needed mark to prevent the shutdown command from running on localhost devices (determined by checking the uri connected to mongo), helping prevent the destructive shutdown failing local test runs.