Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Testing] Unit tests, E2E tests, logging and other Fixes / "Touchups" #253
[Testing] Unit tests, E2E tests, logging and other Fixes / "Touchups" #253
Changes from all commits
913344a
2fcc881
27d9c3a
90d75bd
9181c56
d1659d6
da65f82
ddbd4d0
d2fe64e
8b235bc
b985910
2c03b25
c5bc8e7
8d0ec2f
d62858b
ebc0d6e
254568d
08236ac
69f9a9e
9228887
1a84277
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
For the purposes of the E2E test, we also have the option to shortcut #180 by modifying existing step definitions (e.g.
#TheApplicationIsStakedForService
), or adding new step(s) (i.e. "given ..."), which do this staking against local/dev-netThere 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.
Updating the comment but want to keep the actual change outside the scope of this PR.
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 think
require.Greater()
works better here in general and the part of the comment explaining this assertion is 👌. 💯I'm less convinced that the part of the comment against usage of
require.Len()
is warranted, did you experiment withrequire.Lenf()
?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 did experiment with
Lenf
, but I did experiment with givingrequire.Len
an unformatted string.When there's an error, it prints out the entire claims slice. This was an array of serialized protos and large in length, which looked incomprehensible on the screen and confusing to the reader.
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 did experiment with Lenf, but I did experiment with giving require.Len an unformatted string.
I'm assuming one of those is suppose to be a "didn't". 😅
For the record, in other cases, I would argue that
#Lenf()
produces the least ambiguous output. I agree that the output can be large if the list is not empty; however, that information is useful when debugging, and isn't obscuring the reason for failure as it's on its own line.#Lenf()
#Len()
#Greater()
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.
To be clear, I am not against the use of
Len
orLenf
. However, this is what the output looks like when we are use large serialized objects. Identifying theshould have X items
was a struggle at first, and even more difficult when dealing with 50+ items in the list.