Add setQuerySettings tests#610
Conversation
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
10fe8d6 to
8e67e62
Compare
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage, test-framework); effort from diff stats (3863+1 LOC, 31 files); LLM: Adds new test coverage for the setQuerySettings command operator, covering behavior, output, syntax, and error cases — a functional test expansion across multiple test scenarios. If a label is wrong, remove it manually and ping |
There was a problem hiding this comment.
In order to define the SettingsTestCase class, I renamed query-planning to query_planning. Reason is that hyphens aren't allowed in identifiers, so directories that need to be imported must use underscores instead.
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
|
|
||
| @pytest.mark.admin | ||
| @pytest.mark.replica_set | ||
| @pytest.mark.parametrize("test", pytest_params(SET_QUERY_SETTINGS_REMOVE_TESTS)) |
There was a problem hiding this comment.
no_parallel is only used in the smoke test. Perhaps you meant replica_set? In that case, replica set is required to enable query settings.
| @pytest.mark.parametrize("test", pytest_params(SET_QUERY_SETTINGS_RESPONSE_TESTS)) | ||
| def test_setQuerySettings_response(collection, test): | ||
| """Test setQuerySettings response structure.""" | ||
| ctx = CommandContext.from_collection(collection) |
There was a problem hiding this comment.
Looks like this skeleton is present in most of files. Do we need a shared runner ?
There was a problem hiding this comment.
Could you clarify on what you mean by shared runner? Currently CI is set up to use a shared mongodb instance.
According to the style guide, it says the tests should be as standalone as possible and that helper functions that hide the test logic need to be avoided, so we needed to have separate def test_* functions.
This change adds tests for the setQuerySettings command operator. In order to define the
SettingsTestCaseclass, I renamedquery-planningtoquery_planning. Reason is that hyphens aren't allowed in identifiers, so directories that need to be imported must use underscores instead.Add command operator tests for setQuerySettings. Tests database setQuerySettings behavior, output collection, syntax, and expected errors.
Edit:
replica_setis needed because query settings are not supported on standalone instances