components-contrib/tests/certification/state/postgresql
Mukundan Sundararajan 71a543aed7 fix cert test dependency to dapr/dapr PR dependency
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2022-12-14 11:01:51 +05:30
..
components/docker/default Add postgresql certification test + connection idle time (#1778) 2022-06-10 11:07:26 -07:00
README.md Added cert test for state.mysql 2022-10-31 19:30:33 +00:00
config.yaml Add postgresql certification test + connection idle time (#1778) 2022-06-10 11:07:26 -07:00
docker-compose.yml Add postgresql certification test + connection idle time (#1778) 2022-06-10 11:07:26 -07:00
go.mod fix cert test dependency to dapr/dapr PR dependency 2022-12-14 11:01:51 +05:30
go.sum fix cert test dependency to dapr/dapr PR dependency 2022-12-14 11:01:51 +05:30
postgresql_test.go feature: add context to state API 2022-12-08 15:56:51 +08:00

README.md

PostgreSQL State Store certification testing

This project aims to test the PostgreSQL State Store component under various conditions.

Test plan

Test for CRUD operations

  1. Able to create and test connection.
  2. Able to do set, get, update and delete.
  3. Negative test to fetch record with key, that is not present.

SQL Injection

  • Not prone to SQL injection on write
  • Not prone to SQL injection on read
  • Not prone to SQL injection on delete

Connection Recovery

  1. When PostgreSQL goes down and then comes back up - client is able to connect

Concurrency

  1. Insert a Key-Value pair, eTag is set.
  2. Update Value v2 for this Key with current eTag - eTag is updated.
  3. Try to Update v3 for this Key with wrong eTag - value should not get updated.
  4. Get and validate eTag, which should not have changed.

Transactions

Upsert in Multi function, using 3 keys with updating values and TTL for 2 of the keys, down in the order.