26 Commits

Author SHA1 Message Date
Oleksandr Mazur
e9d37d1b8c Initial formalization of API in form of YAML files
Add initial list of YAML files that formalize Kafka API:
 - requests list that CGW can handle
 - responses that CGW will generate
 - unsolicited events that CGW might generate

Also a small cleanup of requests and responses was made,
to align it with a common format (renamed some of the fields,
added missing etc).
Tests are tweaked to accomodate for changed field names.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-19 14:51:16 +02:00
Oleksandr Mazur
4ee92484e0 CGW: rework partial infra add/del returned infras list
Change CGW behavior to return only 'failed_infras' in both
infra add/del partial or completely failed responses.

This tweaks the previous redundant data that was returned in the
response - list of <all> macs in case of a successfull completion,
which is unnecessary - it's already clear that request succeeded,
and actions were made over supplied infra list.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-19 14:51:16 +02:00
Oleksandr Mazur
3155b8da83 CGW: remove 'infra_name' from infra_group API
Remove unused 'infra_name' from NB API requests that
manage infra_group (add/del).
Also change tests / utils and helper scripts to no longer
form kafka msgs with 'infra_name' present.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-19 14:51:16 +02:00
Oleksandr Mazur
e79afca822 Tests: execute tests in tmpfs context (folder)
Whenever tests start, they might do some enviromental
changes to local FS. Handle this by moving
the 'context' of tests execution to a tmpfs folder, that
can be easily purged after tests are done / new test run
is being executed.

NOTE: further changes in regard to tests isolation should
potentially utilize a separate docker container that serves
as a fresh clean and isolated enviroment for tests run.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-11 16:24:15 +02:00
Oleksandr Mazur
49555495e8 Tests: core: add timeout values for common clients
Force redis, PSQL, kafka clients to have a strict
timeout value for any requests.

It's done to ensure our tests do not hang for an unknown
period of time in case if something goes wrong.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-11 16:24:15 +02:00
Olexandr, Mazur
3f2b42272e Merge pull request #107 from Telecominfraproject/dev-enhance-nb-replys
Dev enhance nb replys
2024-12-11 16:23:11 +02:00
Oleksandr Mazur
8be06b7628 Tests: add missed test file
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-10 17:11:39 +02:00
Sviatoslav Boichuk
840b9a970b Fixed tests print messages 2024-12-10 15:40:27 +02:00
Sviatoslav Boichuk
09e92207e9 Added malformed packets basic tests 2024-12-10 15:23:36 +02:00
Olexandr, Mazur
cd35ca6e1e Merge pull request #105 from Telecominfraproject/dev-basic-msg-relay-test
Dev basic msg relay test
2024-12-10 13:57:48 +02:00
Sviatoslav Boichuk
2405379c50 Added infra assign message relay test 2024-12-10 11:23:37 +02:00
Sviatoslav Boichuk
932b211706 Merge pull request #103 from Telecominfraproject/feat/test_initial_infra_message_impl
Initial infra message impl
2024-12-06 13:03:03 +02:00
Sviatoslav Boichuk
8feb522d6d Updated CGW tests 2024-12-05 16:12:57 +02:00
Oleksandr Mazur
10fd2d765b Testing: initial message queue (infra msg) infrastructure
Add initial infrastructure for sending / receiving messages
using websocket bindings for client sim.
Add initial handle-reboot-simulation test, that both
tests CGW's ability to sink down a request, as well as
test it's behavior whenever simulated device's been rebooted.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-12-05 14:52:24 +02:00
Sviatoslav Boichuk
495d6bba73 Added partial infra add test case 2024-11-25 18:25:43 +02:00
Sviatoslav Boichuk
bb14546499 Rework kafka consumer polling mechanism 2024-11-25 17:40:50 +02:00
Sviatoslav Boichuk
c18c657255 Added cleanup for each test case 2024-11-25 17:06:27 +02:00
Sviatoslav Boichuk
d5b6de0047 Added PSQL Client & Redis Client - modified tests 2024-11-25 13:55:58 +02:00
Sviatoslav Boichuk
35ee4f0a25 Added multiple infras add/del tests and capacity overflow 2024-11-21 14:16:34 +02:00
Sviatoslav Boichuk
cac3c9ac81 Added group capacity overflow test case & fix metrics 2024-11-20 16:26:57 +02:00
Sviatoslav Boichuk
03f8ad6056 Infra add/del tests initial 2024-11-20 16:22:12 +02:00
Sviatoslav Boichuk
7d9fbc918b Added infra group test cases 2024-11-18 12:47:18 +02:00
Sviatoslav Boichuk
055e2fb41c Fix identations 2024-11-18 12:45:59 +02:00
Sviatoslav Boichuk
8e59cd1569 Added metrics checkers to basic tests 2024-11-18 09:59:41 +02:00
Sviatoslav Boichuk
130047bfc0 Added Python dependencies to tests 2024-11-18 09:59:17 +02:00
Oleksandr Mazur
768c41dd90 Testing: introduce initial automated testing _core_ changes
Implement initial core for automated tests:
 * mostly resuses/extends existing simulator, kafka producer etc;
 * helper scripts added for manual testing
   (single infra/group add/del etc)
 * Tests compose either of simple steps premade into fixtures,
   or combine usage of both fixtures + custom code inside
   test's funcion

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2024-11-12 14:20:08 +02:00