-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add mandatory test 6.1.34 #212
Conversation
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.
Looks like the tests did not run on this. Please check that.
Since this PR targets the branch
When we create the final PR against the |
0b075f1
to
067e9d6
Compare
067e9d6
to
4b0f718
Compare
Coverage after merging 197-csaf-2.1-mandatory-test-6.1.34 into 196-csaf-2.1-exclude-unimplemented-tests-from-test-suite
Coverage Report
|
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.
Please see my comment
4b0f718
to
66f9a0f
Compare
@tschmidtb51 Alright, thanks for pointing out. I addressed the issues |
Coverage after merging 197-csaf-2.1-mandatory-test-6.1.34 into 196-csaf-2.1-exclude-unimplemented-tests-from-test-suite
Coverage Report
|
66f9a0f
to
27b2abe
Compare
Coverage after merging 197-csaf-2.1-mandatory-test-6.1.34 into 196-csaf-2.1
Coverage Report
|
Since I reverted to the mocha test suite the command is now |
27b2abe
to
636cda9
Compare
Coverage after merging 197-csaf-2.1-mandatory-test-6.1.34 into 196-csaf-2.1
Coverage Report
|
636cda9
to
c438dea
Compare
Coverage after merging 197-csaf-2.1-mandatory-test-6.1.34 into 196-csaf-2.1
Coverage Report
|
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.
LGTM
* Is used to generate the error messages. | ||
*/ | ||
const checkBranch = (branch, prefix, count = 0) => { | ||
if (count > 30) { |
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.
Can we introduce a constant for the maximum depth?
}) | ||
} | ||
|
||
checkBranch(doc.product_tree, '/product_tree') |
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.
I would prefer to have one recursive function that returns the max depth and one function that creates the error message depending on the result.
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.
As discussed this is unfortunately not possible (I think) since there is no simple answer to the question "How deep is a branch from the top"
ctx.isValid = false | ||
ctx.errors.push({ | ||
instancePath: prefix, | ||
message: `branch structure nesting exceeds 30 branches (it is ${count} levels deep)`, |
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.
The Recursion breaks when the count is 31.
So the level deep in the message seems always to be 31.
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.
Alright, I addressed this issue by only reporting leafes.
c438dea
to
09fe272
Compare
Coverage after merging 197-csaf-2.1-mandatory-test-6.1.34 into 196-csaf-2.1
Coverage Report
|
09fe272
to
58ec07b
Compare
Coverage after merging 197-csaf-2.1-mandatory-test-6.1.34 into 196-csaf-2.1
Coverage Report
|
No description provided.