-
Notifications
You must be signed in to change notification settings - Fork 926
Validate target purpose in spec tests #7113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@@ -398,7 +404,10 @@ export class MockConnection implements Connection { | |||
++this.watchStreamRequestCount; | |||
if (request.addTarget) { | |||
const targetId = request.addTarget.targetId!; | |||
this.activeTargets[targetId] = request.addTarget; | |||
this.activeTargets[targetId] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Record the actual listen request label to validate targetPurpose in active targets.
let targetData = new TargetData( | ||
queryToTarget(parseQuery(expected.queries[0])), | ||
targetId, | ||
TargetPurpose.Listen, | ||
expected.targetPurpose, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected.targetPurpose either specified in the spec test file, or default to listen.
@@ -1117,6 +1116,11 @@ abstract class TestRunner { | |||
version(expected.readTime!) | |||
); | |||
} | |||
|
|||
const expectedLabels = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compare actual listen request label with the label generated by expected target purpose.
Size Report 1Affected ProductsNo changes between base commit (c4276bd) and merge commit (0ca1377).Test Logs |
Size Analysis Report 1Affected ProductsNo changes between base commit (c4276bd) and merge commit (0ca1377).Test Logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, with one minor comment. Thanks for making this improvement! Please open PRs in the ios and android sdks with the updated json files.
Validate targetPurpose in spec test ValidateActiveTargets function.