-
Notifications
You must be signed in to change notification settings - Fork 291
Closed
Labels
testIssues related to testing.Issues related to testing.
Description
Add tests for the command-line interface. In a first version add tests for:
-
serverpod create
-
serverpod generate
The tests need to be runnable locally but also be in continuous integration. The tests should be separate from the integration tests. Proposed solution:
- Place the tests in
tests/cli_tests
- Make a shell (
sh
) script or Dart program that runs the tests. The program will runserverpod create test_create
and place the results intests/cli_tests/test_create
directory. (If the directory exists prior to runningserverpod create
it needs to be deleted). - Make sure that the script runs a local version of the serverpod_cli (see documentation on contributing).
- Remove all files generated by the
flutter create
command from the directory (e.g. macos/android/ios directories). - Compare the contents of the
tests/cli_tests/test_create
directory a previously savedtests/cli_tests/test_create_golden
directory. If they match the test passes. - Make a similar test for
serverpod generate
with atests/cli_tests/test_generate
and atests/cli_tests/test_generate_golden
directory. - The
tests/cli_tests/test_generate/test_generate_server
should ideally contain a sample project with all supported types represented. - Before running
serverpod generate
remove all generated files fromtest_generate_server
andtest_generate_flutter
.
Metadata
Metadata
Assignees
Labels
testIssues related to testing.Issues related to testing.