kurtosis-tech / kurtosis-testsuite-starter-pack

The Unlicense
1 stars 1 forks source link

Example testsuite basic datastore test doesn't use assertions to validate correctness #90

Closed galenmarchetti closed 3 years ago

galenmarchetti commented 3 years ago

Looking at https://github.com/kurtosis-tech/kurtosis-libs/blob/master/golang/testsuite/testsuite_impl/basic_datastore_test/basic_datastore_test_.go , it only uses errors to validate correctness. This is an issue because as an example, it doesn't show users how to handle assertions. This can induce friction in onboarding

mieubrisse commented 3 years ago

@galenmarchetti has this actually caused any friction? Kurtosis started with assertions, and we removed them because they proved to be more complex than just returning errors (first, because you have to pre-define all the assertions that user might possibly want, and second because the only way to do an assertion and break in languages like Go & Rust is to panic, which means that you have to catch & handle panics). I'm strongly in favor of keeping things as they are, returning errors (in cases of langs like Rust & Go) or throwing exceptions (in langs like Java and Javascript)

mieubrisse commented 3 years ago

Closing after discussion with Galen