apache / openwhisk-catalog

Curated catalog of Apache OpenWhisk packages to interface with event producers and consumers
https://openwhisk.apache.org/
Apache License 2.0
33 stars 49 forks source link

Discussion: test files structure #46

Closed daisy-ycguo closed 3 years ago

daisy-ycguo commented 8 years ago

The test codes shall be kept in folder /tests/src. And every package shall have enough test files. A good practice is to have a test file for a single source file. But it's not a mandatory rule. If you want to put all test codes of a package in a single file, that's fine. So our tests shall look like

tests/src/package                             - samples                                     |- GreetingTest                                     |- CatTest                                     |- CountdownTest                                     |- CurlTest                                     |- ...                             - github                                     |- WebhookTest                             - watson                                     |- LanguageIDTest                                     |- SpeechtoTextTest                             - utils                                     |- CatTest                                     |- DateTest

Here is a question and I'd like to get your inputs:

  1. shall we keep "package" folder ? or shall we just remove it ? My opinion is to keep it, just in order to keep the consistency of openwhisk project.

Please input your opinion to the file structure. If we all agree, let's use it as a rule and write it down in CONTRIBUTING.md file.

houshengbo commented 8 years ago

@daisy-ycguo I tend to keep the package folder, and I think it is good idea to keep the test folder in this structure. Already working on moving slacktest to a correct folder.

houshengbo commented 8 years ago

@jasonpet I think this is the discussion raised about some refactoring of the tests.