Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
)
from documentdb_tests.framework.assertions import assertResult
from documentdb_tests.framework.error_codes import (
BUCKET_OUTPUT_DOLLAR_PREFIX_ERROR,
BUCKET_OUTPUT_DOT_ERROR,
ACCUMULATOR_DOLLAR_PREFIX_FIELD_ERROR,
ACCUMULATOR_DOT_FIELD_ERROR,
ACCUMULATOR_NOT_VALID_ERROR,
BUCKET_OUTPUT_ID_RESERVED_ERROR,
BUCKET_OUTPUT_NOT_ACCUMULATOR_ERROR,
BUCKET_OUTPUT_NOT_OBJECT_ERROR,
)
from documentdb_tests.framework.executor import execute_command
Expand Down Expand Up @@ -239,7 +239,7 @@
pipeline=[
{"$bucket": {"groupBy": "$x", "boundaries": [0, 10], "output": {"$": {"$sum": 1}}}}
],
error_code=BUCKET_OUTPUT_DOLLAR_PREFIX_ERROR,
error_code=ACCUMULATOR_DOLLAR_PREFIX_FIELD_ERROR,
msg="$bucket should reject output field name '$'",
),
StageTestCase(
Expand All @@ -254,7 +254,7 @@
}
}
],
error_code=BUCKET_OUTPUT_DOLLAR_PREFIX_ERROR,
error_code=ACCUMULATOR_DOLLAR_PREFIX_FIELD_ERROR,
msg="$bucket should reject $-prefixed output field name",
),
StageTestCase(
Expand All @@ -269,7 +269,7 @@
}
}
],
error_code=BUCKET_OUTPUT_DOLLAR_PREFIX_ERROR,
error_code=ACCUMULATOR_DOLLAR_PREFIX_FIELD_ERROR,
msg="$bucket should reject $$-prefixed output field name",
),
]
Expand All @@ -289,7 +289,7 @@
}
}
],
error_code=BUCKET_OUTPUT_DOT_ERROR,
error_code=ACCUMULATOR_DOT_FIELD_ERROR,
msg="$bucket should reject output field name containing dot",
),
StageTestCase(
Expand All @@ -304,7 +304,7 @@
}
}
],
error_code=BUCKET_OUTPUT_DOT_ERROR,
error_code=ACCUMULATOR_DOT_FIELD_ERROR,
msg="$bucket should reject output field name starting with dot",
),
StageTestCase(
Expand All @@ -319,7 +319,7 @@
}
}
],
error_code=BUCKET_OUTPUT_DOT_ERROR,
error_code=ACCUMULATOR_DOT_FIELD_ERROR,
msg="$bucket should reject output field name ending with dot",
),
]
Expand Down Expand Up @@ -359,7 +359,7 @@
}
}
],
error_code=BUCKET_OUTPUT_NOT_ACCUMULATOR_ERROR,
error_code=ACCUMULATOR_NOT_VALID_ERROR,
msg="$bucket should reject non-accumulator int value in output",
),
StageTestCase(
Expand All @@ -374,7 +374,7 @@
}
}
],
error_code=BUCKET_OUTPUT_NOT_ACCUMULATOR_ERROR,
error_code=ACCUMULATOR_NOT_VALID_ERROR,
msg="$bucket should reject non-accumulator string value in output",
),
StageTestCase(
Expand All @@ -389,7 +389,7 @@
}
}
],
error_code=BUCKET_OUTPUT_NOT_ACCUMULATOR_ERROR,
error_code=ACCUMULATOR_NOT_VALID_ERROR,
msg="$bucket should reject non-accumulator null value in output",
),
]
Expand Down
Loading