components-contrib/tests/certification/state/postgresql
Bernd Verst bfab257f4d reset certification tests
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-09-21 23:52:23 +00:00
..
components/docker/default Add postgresql certification test + connection idle time (#1778) 2022-06-10 11:07:26 -07:00
README.md Add postgresql certification test + connection idle time (#1778) 2022-06-10 11:07:26 -07: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 reset certification tests 2022-09-21 23:52:23 +00:00
go.sum reset certification tests 2022-09-21 23:52:23 +00:00
postgresql_test.go Components' init functions should return interfaces (#1997) 2022-08-25 18:27:45 -07: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

a. Insert a Key-Value pair, eTag will be 1 b. Update Value v2 for this Key with eTag equal to 1 - new eTag wil be 2. c. Try to Update v3 for this Key with eTag equal to 4 - value should not get updated. d. Get and validate eTag for it should be 2 only.

Transactions

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