diff options
author | Huayu Ouyang <huayu.ouyang@mongodb.com> | 2021-03-15 23:29:45 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-18 23:34:01 +0000 |
commit | 37bc14bbf9e1241bf77684d3ab13ae36929a386b (patch) | |
tree | 0fe52d29ec840403a1bcaae1a301e1e277df55d7 /buildscripts/idl/tests/compatibility_test_fail | |
parent | 138acafd27f145622506ef422a48c056fb4883df (diff) | |
download | mongo-37bc14bbf9e1241bf77684d3ab13ae36929a386b.tar.gz |
SERVER-54532 Extend buildscripts/idl/idl_check_compatibility.py to check for additions and changes in complex
Diffstat (limited to 'buildscripts/idl/tests/compatibility_test_fail')
-rw-r--r-- | buildscripts/idl/tests/compatibility_test_fail/new/compatibility_test_fail_new.idl | 157 | ||||
-rw-r--r-- | buildscripts/idl/tests/compatibility_test_fail/old/compatibility_test_fail_old.idl | 154 |
2 files changed, 309 insertions, 2 deletions
diff --git a/buildscripts/idl/tests/compatibility_test_fail/new/compatibility_test_fail_new.idl b/buildscripts/idl/tests/compatibility_test_fail/new/compatibility_test_fail_new.idl index 8b5e4d2e6bf..d4ef773c95b 100644 --- a/buildscripts/idl/tests/compatibility_test_fail/new/compatibility_test_fail_new.idl +++ b/buildscripts/idl/tests/compatibility_test_fail/new/compatibility_test_fail_new.idl @@ -1827,4 +1827,159 @@ commands: cpp_name: InvalidReplySkippedCommand strict: true api_version: "1" - reply_type: OkReply
\ No newline at end of file + reply_type: OkReply + + accessCheckTypeChange: + description: "new command fails because the access check type has changed" + command_name: accessCheckTypeChange + namespace: ignored + cpp_name: accessCheckTypeChange + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - privilege: + resource_pattern: resourcePattern + action_type: [actionTypeOne, actionTypeTwo] + - check: checkThree + - check: checkOne + + accessCheckTypeChangeTwo: + description: "new command fails because the access check type has changed" + command_name: accessCheckTypeChangeTwo + namespace: ignored + cpp_name: accessCheckTypeChangeTwo + strict: true + api_version: "1" + reply_type: OkReply + access_check: + none: true + + complexChecksNotSubset: + description: "new command fails because the complex checks are not a subset of the + old complex checks" + command_name: complexChecksNotSubset + namespace: ignored + cpp_name: complexChecksNotSubset + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - check: checkThree + - check: checkOne + + complexChecksNotSubsetTwo: + description: "new command fails because the complex checks are not a subset of the + old complex checks" + command_name: complexChecksNotSubsetTwo + namespace: ignored + cpp_name: complexChecksNotSubsetTwo + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - privilege: + resource_pattern: resourcePattern + action_type: [actionTypeOne, actionTypeTwo] + - check: checkThree + - check: checkOne + - check: checkTwo + + complexResourcePatternChange: + description: "new command fails because there is a change in the complex resource patterns" + command_name: complexResourcePatternChange + namespace: ignored + cpp_name: complexResourcePatternChange + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - privilege: + resource_pattern: resourcePattern + action_type: [actionTypeOne, actionTypeTwo] + - privilege: + resource_pattern: resourcePatternTwo + action_type: actionTypeOne + + complexActionTypesNotSubset: + description: "new command fails because there is a change in the complex action types" + command_name: complexActionTypesNotSubset + namespace: ignored + cpp_name: complexActionTypesNotSubset + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - privilege: + resource_pattern: resourcePattern + action_type: [actionTypeOne, actionTypeTwo] + - check: checkOne + - privilege: + resource_pattern: resourcePatternTwo + action_type: [actionTypeOne, actionTypeTwo, actionTypeThree] + + complexActionTypesNotSubsetTwo: + description: "new command fails because there is a change in the complex action types" + command_name: complexActionTypesNotSubsetTwo + namespace: ignored + cpp_name: complexActionTypesNotSubsetTwo + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - privilege: + resource_pattern: resourcePatternTwo + action_type: [actionTypeFour] + - privilege: + resource_pattern: resourcePattern + action_type: [actionTypeThree, actionTypeOne, actionTypeTwo] + - privilege: + resource_pattern: resourcePatternThree + action_type: [actionTypeOne, actionTypeFour] + + additionalComplexAccessCheck: + description: "new command fails because there is an additional complex access check" + command_name: additionalComplexAccessCheck + namespace: ignored + cpp_name: additionalComplexAccessCheck + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - privilege: + resource_pattern: resourcePattern + action_type: [actionTypeOne, actionTypeTwo] + - check: checkOne + - privilege: + resource_pattern: resourcePattern + action_type: actionTypeOne + - privilege: + resource_pattern: resourcePatternTwo + action_type: actionTypeOne + + removedAccessCheckField: + description: "new command fails because it removes the access_check field" + command_name: removedAccessCheckField + namespace: ignored + cpp_name: removedAccessCheckField + strict: true + api_version: "1" + reply_type: OkReply + + addedAccessCheckField: + description: "new command fails because it adds the access_check field when the api_version is '1'" + command_name: addedAccessCheckField + namespace: ignored + cpp_name: addedAccessCheckField + strict: true + api_version: "1" + reply_type: OkReply + access_check: + none: true diff --git a/buildscripts/idl/tests/compatibility_test_fail/old/compatibility_test_fail_old.idl b/buildscripts/idl/tests/compatibility_test_fail/old/compatibility_test_fail_old.idl index a0942756341..674dd813172 100644 --- a/buildscripts/idl/tests/compatibility_test_fail/old/compatibility_test_fail_old.idl +++ b/buildscripts/idl/tests/compatibility_test_fail/old/compatibility_test_fail_old.idl @@ -1816,4 +1816,156 @@ commands: cpp_name: InvalidReplySkippedCommand strict: true api_version: "1" - reply_type: NotStructFieldReply
\ No newline at end of file + reply_type: NotStructFieldReply + + accessCheckTypeChange: + description: "new command fails because the access check type has changed" + command_name: accessCheckTypeChange + namespace: ignored + cpp_name: accessCheckTypeChange + strict: true + api_version: "1" + reply_type: OkReply + access_check: + simple: + check: oldCheck + + accessCheckTypeChangeTwo: + description: "new command fails because the access check type has changed" + command_name: accessCheckTypeChangeTwo + namespace: ignored + cpp_name: accessCheckTypeChangeTwo + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - privilege: + resource_pattern: resourcePattern + action_type: [actionTypeOne, actionTypeTwo] + - check: checkThree + - check: checkOne + + complexChecksNotSubset: + description: "new command fails because the complex checks are not a subset of the + old complex checks" + command_name: complexChecksNotSubset + namespace: ignored + cpp_name: complexChecksNotSubset + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - check: checkOne + - check: checkTwo + + complexChecksNotSubsetTwo: + description: "new command fails because the complex checks are not a subset of the + old complex checks" + command_name: complexChecksNotSubsetTwo + namespace: ignored + cpp_name: complexChecksNotSubsetTwo + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - privilege: + resource_pattern: resourcePattern + action_type: [actionTypeOne, actionTypeTwo] + - check: checkOne + - check: checkTwo + + complexResourcePatternChange: + description: "new command fails because there is a change in the complex resource patterns" + command_name: complexResourcePatternChange + namespace: ignored + cpp_name: complexResourcePatternChange + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - privilege: + resource_pattern: resourcePattern + action_type: [actionTypeOne, actionTypeTwo] + - privilege: + resource_pattern: resourcePattern + action_type: actionTypeOne + + complexActionTypesNotSubset: + description: "new command fails because there is a change in the complex action types" + command_name: complexActionTypesNotSubset + namespace: ignored + cpp_name: complexActionTypesNotSubset + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - privilege: + resource_pattern: resourcePatternTwo + action_type: [actionTypeOne, actionTypeTwo, actionTypeThree] + - privilege: + resource_pattern: resourcePattern + action_type: actionTypeOne + - check: checkOne + + complexActionTypesNotSubsetTwo: + description: "new command fails because there is a change in the complex action types" + command_name: complexActionTypesNotSubsetTwo + namespace: ignored + cpp_name: complexActionTypesNotSubsetTwo + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - privilege: + resource_pattern: resourcePattern + action_type: [actionTypeOne, actionTypeTwo, actionTypeThree] + - privilege: + resource_pattern: resourcePatternTwo + action_type: [actionTypeOne, actionTypeFour] + - privilege: + resource_pattern: resourcePatternThree + action_type: [actionTypeOne, actionTypeTwo, actionTypeThree] + + additionalComplexAccessCheck: + description: "new command fails because there is an additional complex access check" + command_name: additionalComplexAccessCheck + namespace: ignored + cpp_name: additionalComplexAccessCheck + strict: true + api_version: "1" + reply_type: OkReply + access_check: + complex: + - privilege: + resource_pattern: resourcePattern + action_type: [actionTypeOne, actionTypeTwo] + - check: checkOne + - privilege: + resource_pattern: resourcePattern + action_type: actionTypeOne + + removedAccessCheckField: + description: "new command fails because it removes the access_check field" + command_name: removedAccessCheckField + namespace: ignored + cpp_name: removedAccessCheckField + strict: true + api_version: "1" + reply_type: OkReply + access_check: + none: true + + addedAccessCheckField: + description: "new command fails because it adds the access_check field when the api_version is '1'" + command_name: addedAccessCheckField + namespace: ignored + cpp_name: addedAccessCheckField + strict: true + api_version: "1" + reply_type: OkReply |