GODRIVER-3140 Update client-side-encryption spec tests.#1651
GODRIVER-3140 Update client-side-encryption spec tests.#1651qingyang-hu wants to merge 13 commits intomongodb:masterfrom
Conversation
API Change ReportNo changes found! |
475502f to
96298c3
Compare
| return nil | ||
| } | ||
| } | ||
| return fmt.Errorf("BSON type mismatch for key %s; expected %s, got %s", key, array.String(), actual) |
There was a problem hiding this comment.
| return fmt.Errorf("BSON type mismatch for key %s; expected %s, got %s", key, array.String(), actual) | |
| return fmt.Errorf("BSON type mismatch for key %q; expected %s, got %q", key, array, actual.Type) |
%s will use the bson.RawValue.String() method for array. Additionally, suggest using the actual type rather than the value of actual in the error message.
| } | ||
| return fmt.Errorf("BSON type mismatch for key %s; expected %s, got %s", key, array.String(), actual) | ||
| default: | ||
| return fmt.Errorf("unsupported $$type: %s", t.String()) |
There was a problem hiding this comment.
| return fmt.Errorf("unsupported $$type: %s", t.String()) | |
| return fmt.Errorf("unsupported $$type: %q", t) |
q will use the bsontype String() method.
| // $$type represents a type assertion | ||
| // for example {field: {$$type: "binData"}} should assert that "field" is an element with a binary value | ||
| return checkValueType(mt, key, actual.Type, typeVal.StringValue()) | ||
| switch t := typeVal.Type; t { |
There was a problem hiding this comment.
Optional. Use a different name for this variable, such as typ.
| if t.clientOpts != nil && t.clientOpts.AutoEncryptionOptions != nil && len(t.failPointNames) > 0 { | ||
| t.Logf("configureFailPoint is not supported for auto encryption, skipping ClearFailPoints()") | ||
| t.failPointNames = t.failPointNames[:0] |
There was a problem hiding this comment.
The added spec tests include both AutoEncryptionOptions and "configureFailPoint", which seems to suggest that "configureFailPoint" is being run successfully during the test (to enable the failpoint). Does disabling failpoints behave differently than enabling failpoints when AutoEncryptionOptions are set?
There was a problem hiding this comment.
Yes, clearing fail point fails for "mongocrypt error 1: command not supported for auto encryption: configureFailPoint".
^ The issue was caused because of GODRIVER-2123.
9263a71 to
3ddf46a
Compare
a859b1e to
80e941f
Compare
c4c67dd to
928555a
Compare
91f87f3 to
4dcc585
Compare
17c4846 to
12fb07c
Compare
ba5b63f to
b388b98
Compare
GODRIVER-3140
Summary
Update client-side-encryption spec tests, reflecting spec PR #1564.