soda-sql icon indicating copy to clipboard operation
soda-sql copied to clipboard

Implement testing of all datasources on CLI level

Open milanaleksic opened this issue 4 years ago • 0 comments

Current state

We have various kinds and levels of testing using in some cases even real warehouse types we support.

On the "acceptance level" of the soda CLI command we are testing only Postgres database (unit test source file: https://github.com/sodadata/soda-sql/blob/main/tests/local/warehouse/cli/test_cli.py). This test connects to PostgreSQL database, inserts some data (the same SQL data that tutorial uses: https://github.com/sodadata/soda-sql/blob/main/tests/demo/demodata.sql).

Desired state

We should be able to generate test data using Dialect support for each warehouse we currently use. We should commit this test data for usage in tutorials and in tests, but we should be able to re-run that script later on if we want to add more data types, different data etc.

We should add tests like above-mentioned PostgreSQL test which would run against a particular warehouse, inserting the SQL data generated by the script and verifying metric calculation works as expected.

We should be able to add tutorial pages in our documentation that refer to the demo data we have created, making sure the steps are identical as in our test.

milanaleksic avatar Feb 16 '21 10:02 milanaleksic