Skip to content

Conversation

@mikehquan19
Copy link
Contributor

This is the unit test for the parser/validator.go. My apologies that it took so long to finish it. However, there are a few problems.

Because validation basically panics and logs messages when data are invalid, my tests are divided into 2 types:

  • the pass case where data are all valid and make sure the function doesn't panic and print anything
  • the fail case where data are invalid and make sure the function panics and prints the correct message

But should the test for validation be too detailed as written in my code or should it be a little bit less? I might have been overthinking and ended up writing 500 lines worth of code to test validator.go, which is only 150 lines.

The test somehow passed both tests on Ubuntu and Windows but failed on deployment because Google Cloud wasn't able to generate some types of keys. How can I fix this?

Thank you.

@jpahm
Copy link
Contributor

jpahm commented Mar 14, 2025

Thank you, I'll review this in detail soon!

@jpahm jpahm merged commit 319c368 into UTDNebula:develop Apr 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants