diff options
author | Huayu Ouyang <huayu.ouyang@mongodb.com> | 2021-02-25 17:09:04 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-03 01:43:48 +0000 |
commit | 4633fd74adf26e75c179c184e5af4247db21415f (patch) | |
tree | fc03e96db6087945481e7748b21e3db1e883e5f3 /buildscripts/idl/tests/compatibility_test_fail | |
parent | 82cb2954a0b252f7bc193bf01b5ca105cd637b6e (diff) | |
download | mongo-4633fd74adf26e75c179c184e5af4247db21415f.tar.gz |
SERVER-54518 Change command "type" struct field compatibility checker to check for new non-optional fields
Diffstat (limited to 'buildscripts/idl/tests/compatibility_test_fail')
-rw-r--r-- | buildscripts/idl/tests/compatibility_test_fail/new/compatibility_test_fail_new.idl | 35 | ||||
-rw-r--r-- | buildscripts/idl/tests/compatibility_test_fail/old/compatibility_test_fail_old.idl | 34 |
2 files changed, 69 insertions, 0 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 de6cde2f125..687c54bc75a 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 @@ -267,6 +267,19 @@ structs: gte: -2.98 callback: "callback" + AddedRequiredTypeFieldStruct: + description: "This struct contains a field that is added and required in the new version." + fields: + addedRequiredTypeField: + type: string + + StableRequiredTypeFieldStruct: + description: "This struct contains a field that is stable and required in the new version + that was unstable in the old version" + fields: + stableRequiredTypeField: + type: string + commands: invalidAPIVersionNew: description: "new command fails because of invalid API version" @@ -833,6 +846,28 @@ commands: api_version: "1" reply_type: OkReply + newTypeFieldAddedRequired: + description: "new command fails because it has an added type field that is required + when it should be optional" + command_name: newTypeFieldAddedRequired + namespace: type + type: AddedRequiredTypeFieldStruct + cpp_name: newTypeFieldAddedRequired + strict: true + api_version: "1" + reply_type: OkReply + + newTypeFieldStableRequired: + description: "new required stable type field fails because it is unstable + in the corresponding old command" + command_name: newTypeFieldStableRequired + namespace: type + type: StableRequiredTypeFieldStruct + cpp_name: newTypeFieldStableRequired + strict: true + api_version: "1" + reply_type: OkReply + newReplyFieldVariantType: description: "new command fails because its reply field type is a variant type while the old reply field is not a variant type" 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 9e4da2a45be..19dc8070a5b 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 @@ -268,6 +268,18 @@ structs: gte: -2.97 callback: "callback" + AddedRequiredTypeFieldStruct: + description: "This struct contains a field that is added and required in the new version." + + StableRequiredTypeFieldStruct: + description: "This struct contains a field that is stable and required in the new version + that was unstable in the old version" + fields: + stableRequiredTypeField: + type: string + unstable: true + + commands: invalidAPIVersionOld: description: "old command fails because of invalid API version" @@ -822,6 +834,28 @@ commands: api_version: "1" reply_type: OkReply + newTypeFieldAddedRequired: + description: "new command fails because it has an added type field that is required + when it should be optional" + command_name: newTypeFieldAddedRequired + namespace: type + type: AddedRequiredTypeFieldStruct + cpp_name: newTypeFieldAddedRequired + strict: true + api_version: "1" + reply_type: OkReply + + newTypeFieldStableRequired: + description: "new required stable type field fails because it is unstable + in the corresponding old command" + command_name: newTypeFieldStableRequired + namespace: type + type: StableRequiredTypeFieldStruct + cpp_name: newTypeFieldStableRequired + strict: true + api_version: "1" + reply_type: OkReply + newReplyFieldVariantType: description: "new command fails because its reply field type is a variant type while the old reply field is not a variant type" |