Closed CubicrootXYZ closed 3 years ago
Well, one part I did not think about is the automatic testing in the action. It will not work as there is no config.yml provided with e.g. matrix credentials. Should we just skip those tests when no config is provided or do we want to somehow get those credentials into the action?
This is related to #12.
Hey @CubicrootXYZ, thanks for this pull request!
I think unit tests make the most sense for now; great idea to have a separate mockup module.
As for your question: I'm not yet certain what tests fail exactly. Either way, I would "assume" the library to function properly, so we only need to test what calls are made. Maybe we can setup the tests in a way so the function calls are actually made to a module of our own instead to the library? That way, we would just "emulate" a connection and check if correct calls were made. What I would refrain from is having credentials used in the tests: it's best to be able to perform the tests without Internet connection anyway.
Only part that needed credentials was the dispatcher - replaced him with a generic one that does nothing. Now the tests run without any external information needed.
Looking good! Is this ready to merge?
Yes :)
I added a few tests, let's discuss if this is the approach we want to use.
I tried to make the tests as lightweight as possible - without any fancy testing suites or so. A description on how to use them is appended to the Readme.
The new "tests" module holds helpers for initializing tests.