Hemio e. V. issueshttps://git.hemio.de/groups/hemio/-/issues2017-10-28T12:23:13+02:00https://git.hemio.de/hemio/hamsql/-/issues/67Automated tests and coverage reports2017-10-28T12:23:13+02:00Sophie HeroldAutomated tests and coverage reports## Tests
- Setup postgresql on build-server
## Coverage
- https://about.gitlab.com/2016/11/03/publish-code-coverage-report-with-gitlab-pages
- https://docs.gitlab.com/ce/user/project/pipelines/settings.html#test-coverage-parsing
- htt...## Tests
- Setup postgresql on build-server
## Coverage
- https://about.gitlab.com/2016/11/03/publish-code-coverage-report-with-gitlab-pages
- https://docs.gitlab.com/ce/user/project/pipelines/settings.html#test-coverage-parsing
- https://docs.gitlab.com/ce/user/project/pipelines/settings.html#test-coverage-report-badgehttps://git.hemio.de/hemio/edentata/-/issues/7Add module for DynDNS2017-08-05T04:04:15+02:00Sophie HeroldAdd module for DynDNSIs DynDNS something like trademark? Can we call it like this?Is DynDNS something like trademark? Can we call it like this?Merge Requests Welcomehttps://git.hemio.de/hemio/hamsql/-/issues/71Migrate unit tests from Python to Haskell2019-10-19T23:41:51+02:00Sophie HeroldMigrate unit tests from Python to Haskell##### Objects
- [x] Tables
- [x] Columns
- [x] Unique
- [x] FKs
- [x] Serial
- [x] Check
- [ ] Inheritance
- [x] Functions
- [x] Domains
- [x] Types
- [x] Roles
- [x] Sequence
- [x] Schema
##### Features
- [x] Upgrades##### Objects
- [x] Tables
- [x] Columns
- [x] Unique
- [x] FKs
- [x] Serial
- [x] Check
- [ ] Inheritance
- [x] Functions
- [x] Domains
- [x] Types
- [x] Roles
- [x] Sequence
- [x] Schema
##### Features
- [x] UpgradesHamSql v0.11Sophie HeroldSophie Heroldhttps://git.hemio.de/hemio/hamsql/-/issues/70SQL test framework2017-10-28T12:23:13+02:00Sophie HeroldSQL test frameworkThis needs some conceptional work.
Some open questions
- [ ] Which SQL connection do we use and how to ensure we do not kill production systems #56
## Scenarios
Files in `test-scenarios.d`. Scenarios have a name and can depe...This needs some conceptional work.
Some open questions
- [ ] Which SQL connection do we use and how to ensure we do not kill production systems #56
## Scenarios
Files in `test-scenarios.d`. Scenarios have a name and can depend on other scenarios. Usually they are just SQL code. But they could also execute SQL code they get from calling an executable.
```sql
---
name: minimal
description: Minimal scenario
dependencies:
- main.minimal
---
INSERT INTO myschema.mytable ('a', 1);
```
Randomness is mainly achieved by calling an executable. Maybe we we also want to allow to fill template variables with SQL queries or executable calls. For example to have random passwords for test users.
## Function tests
*Returning TABLE.* Execute given SQL query. Simplest assertion is number of returned rows.
```yaml
tests:
- scenario: mymodule.minimal
test: SELECT * FROM $(THIS)
assertions:
- rows: 1
- sql: (SELECT a FROM $(TEST)) IN ('x', 'y', 'z')
```
*Returning value.*
```yaml
tests:
- scenario: myschema.minimal
parameters: (25, u: '{"a": 2}'::jsonb)
assertion:
value_equals: "'a'"
```
## Test Execution
1. Install DB structure
2. Create `SAVEPOINT clean`
3. Loop through all existing scenarios:
1. Deploy scenario
2. Create `SAVEPOINT scenario`
3. Loop through all tests based on current scenario
1. Run test (block repeated for each assertion)
2. `ROLLBACK TO scenario`
4. `ROLLBACK TO clean`
## Deploy scenarios
For integration tests or development.
```
$ hamsql deploy-scenario myschema.minimal
Notes for scenario "main"."minimal"
You can use the following user for tests:
User: test1
Password: testtest
```https://git.hemio.de/hemio/hamsql/-/issues/65Reduce number of database reconnections2017-10-28T12:23:13+02:00Sophie HeroldReduce number of database reconnectionsHamSql v0.13https://git.hemio.de/hemio/hamsql/-/issues/61Report source filename on error2017-10-28T12:23:13+02:00Sophie HeroldReport source filename on errorThis requires to wrap the source file information around all objects.This requires to wrap the source file information around all objects.HamSql v0.13https://git.hemio.de/hemio/hamsql/-/issues/59Unit tests tables that contain more indices2017-10-28T12:23:14+02:00Sophie HeroldUnit tests tables that contain more indicesDo not check them yet. Just ensure that the sql code doesen't fail.Do not check them yet. Just ensure that the sql code doesen't fail.HamSql v0.11Sophie HeroldSophie Heroldhttps://git.hemio.de/hemio/hamsql/-/issues/56Integrate postgres-connection to Setup2017-10-28T12:23:14+02:00Sophie HeroldIntegrate postgres-connection to SetupHamSql v0.13https://git.hemio.de/hemio/hamsql/-/issues/54Implement TEXT SEARCH2017-10-28T12:23:14+02:00Sophie HeroldImplement TEXT SEARCHSupport all SQL Featureshttps://git.hemio.de/hemio/hamsql/-/issues/53Implement TABLESPACE2017-10-28T12:23:14+02:00Sophie HeroldImplement TABLESPACESupport all SQL Featureshttps://git.hemio.de/hemio/hamsql/-/issues/52Strange SQL Features2017-10-28T12:23:14+02:00Sophie HeroldStrange SQL FeaturesStrange means: I don't know much about them.
- [ ] https://www.postgresql.org/docs/9.5/static/sql-createcollation.html
- [ ] https://www.postgresql.org/docs/9.5/static/sql-createconversion.html
- [ ] https://www.postgresql.org/docs/...Strange means: I don't know much about them.
- [ ] https://www.postgresql.org/docs/9.5/static/sql-createcollation.html
- [ ] https://www.postgresql.org/docs/9.5/static/sql-createconversion.html
- [ ] https://www.postgresql.org/docs/9.5/static/sql-createeventtrigger.html
- [ ] https://www.postgresql.org/docs/9.5/static/sql-createopclass.html
- [ ] https://www.postgresql.org/docs/9.5/static/sql-createopfamily.html
- [ ] https://www.postgresql.org/docs/9.5/static/sql-createserver.html
- [ ] https://www.postgresql.org/docs/9.5/static/sql-createtransform.html
- [ ] https://www.postgresql.org/docs/9.5/static/sql-createusermapping.htmlSupport all SQL Featureshttps://git.hemio.de/hemio/hamsql/-/issues/51Implement RULE2017-10-28T12:23:14+02:00Sophie HeroldImplement RULESupport all SQL Featureshttps://git.hemio.de/hemio/hamsql/-/issues/50Implement OPERATOR2017-10-28T12:23:14+02:00Sophie HeroldImplement OPERATORSupport all SQL Featureshttps://git.hemio.de/hemio/hamsql/-/issues/49Implement LANGUAGE2017-10-28T12:23:14+02:00Sophie HeroldImplement LANGUAGESupport all SQL Featureshttps://git.hemio.de/hemio/hamsql/-/issues/25Consider migrating to stack2017-10-28T12:23:35+02:00Sophie HeroldConsider migrating to stack<http://docs.haskellstack.org/en/stable/README/><http://docs.haskellstack.org/en/stable/README/>https://git.hemio.de/hemio/hamsql/-/issues/20Add setup and/or module versions2017-10-28T12:23:35+02:00Sophie HeroldAdd setup and/or module versionshttps://git.hemio.de/hemio/hamsql/-/issues/17Data manipulation unit tests2017-10-28T12:23:35+02:00Sophie HeroldData manipulation unit testsCan check
- contraints
- types
- views
- triggersCan check
- contraints
- types
- views
- triggershttps://git.hemio.de/hemio/hamsql/-/issues/16Function units tests2017-10-28T12:23:35+02:00Sophie HeroldFunction units testshttps://git.hemio.de/hemio/hamsql/-/issues/11Implement default values via types2017-10-28T12:23:35+02:00Sophie HeroldImplement default values via typesShould be possible but have to write a parser for those typesShould be possible but have to write a parser for those typeshttps://git.hemio.de/hemio/hamsql/-/issues/6Report on existing roles2017-10-28T12:23:35+02:00Sophie HeroldReport on existing rolesCould enhance security of deployments.Could enhance security of deployments.