components-contrib/tests/certification/state/redis
Roberto Rojas 413eee94db
GCP PubSub - Certification Tests (#2689)
Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>
Signed-off-by: Bernd Verst <github@bernd.dev>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-04-24 22:23:34 +00:00
..
components/docker Fix Redis metadata parsing and reporting (#2803) 2023-04-23 06:28:22 +00:00
README.md Add Redis StateStore Certification Tests (#1763) 2022-06-07 18:30:54 -07:00
config.yaml Add Redis StateStore Certification Tests (#1763) 2022-06-07 18:30:54 -07:00
docker-compose.yml Add Redis StateStore Certification Tests (#1763) 2022-06-07 18:30:54 -07:00
redis_test.go GCP PubSub - Certification Tests (#2689) 2023-04-24 22:23:34 +00:00

README.md

Redis State Store certification testing

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

Test plan

Basic Test for CRUD operations:

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

Test save or update data with different TTL settings:

  1. TTL not expiring
  2. TTL not a valid number
  3. Provide a TTL of 1 second: a. Fetch this record just after saving b. Sleep for 2 seconds c. Try to fetch again after a gap of 2 seconds, record shouldn't be found

Component must reconnect when server or network errors are encountered

Infra test:

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

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.

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

enableTLS set to true & enableTLS not integer:

Testing by creating component with ignoreErrors: true and then trying to use it, by trying to save, which should error out as state store never got configured successfully.