Skip to content

Commit

Permalink
Merge branch 'main' into require-id-1150
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] committed Oct 20, 2022
2 parents 18322d4 + 7ca4464 commit ba4b417
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
7 changes: 7 additions & 0 deletions integration/findandmodify_compat_test.go
Expand Up @@ -171,6 +171,13 @@ func TestFindAndModifyCompatUpdate(t *testing.T) {
{"new", true},
},
},
"EmptyUpdate": {
command: bson.D{
{"query", bson.D{{"_id", "int64"}}},
{"update", bson.D{{"v", bson.D{}}}},
},
skipForTigris: "schema validation would fail",
},
}

testFindAndModifyCompat(t, testCases)
Expand Down
2 changes: 1 addition & 1 deletion integration/update_field_compat_test.go
Expand Up @@ -78,7 +78,7 @@ func TestUpdateFieldCompatMax(t *testing.T) {
},
"EmptyDocument": {
update: bson.D{{"$max", bson.D{{"v", bson.D{{}}}}}},
skip: "https://github.com/FerretDB/FerretDB/issues/1000",
skip: "https://github.com/FerretDB/FerretDB/issues/457",
},
"Double": {
update: bson.D{{"$max", bson.D{{"v", 54.32}}}},
Expand Down
21 changes: 10 additions & 11 deletions integration/update_field_test.go
Expand Up @@ -1310,17 +1310,16 @@ func TestUpdateFieldPopArrayOperator(t *testing.T) {
update: bson.D{{"$pop", bson.D{{"foo", 1}}}},
expected: bson.D{{"_id", "array"}, {"v", bson.A{int32(42)}}},
},
// TODO: https://github.com/FerretDB/FerretDB/issues/1000
//"PopEmptyValue": {
// id: "array",
// update: bson.D{{"$pop", bson.D{}}},
// expected: bson.D{{"_id", "array"}, {"v", bson.A{int32(42)}}},
// stat: &mongo.UpdateResult{
// MatchedCount: 1,
// ModifiedCount: 0,
// UpsertedCount: 0,
// },
//},
"PopEmptyValue": {
id: "array",
update: bson.D{{"$pop", bson.D{}}},
expected: bson.D{{"_id", "array"}, {"v", bson.A{int32(42)}}},
stat: &mongo.UpdateResult{
MatchedCount: 1,
ModifiedCount: 0,
UpsertedCount: 0,
},
},
} {
name, tc := name, tc
t.Run(name, func(t *testing.T) {
Expand Down
9 changes: 0 additions & 9 deletions integration/update_test.go
Expand Up @@ -228,15 +228,6 @@ func TestUpdateReplaceDocuments(t *testing.T) {
expectedFilter: bson.D{{"_id", "document-composite"}},
expected: bson.D{{"_id", "document-composite"}, {"replacement-value", int32(1)}},
},
// TODO: https://github.com/FerretDB/FerretDB/issues/1000
//"ReplaceDotNotationWithEmptyDoc": {
// update: bson.D{
// {"q", bson.D{{"v.array.0", bson.D{{"$eq", int32(42)}}}}},
// {"u", bson.D{{}}},
// },
// expectedFilter: bson.D{{"_id", "document-composite"}},
// expected: bson.D{{"_id", "document-composite"}},
//},
} {
name, tc := name, tc
t.Run(name, func(t *testing.T) {
Expand Down

0 comments on commit ba4b417

Please sign in to comment.