Commit Graph

266 Commits

Author SHA1 Message Date
ionutboangiu
1b24a504dc add flaky build constraint to unstable tests 2024-08-21 20:59:10 +02:00
ionutboangiu
0f70af84e9 centralize test flags for shared use across tests 2024-08-15 18:17:33 +02:00
ionutboangiu
0dfb3b860d Centralize RPCClient constructor 2024-08-15 18:17:33 +02:00
arberkatellari
91630f39a5 Add exporter id within the *vars in EEs for templates 2024-08-14 14:06:03 +02:00
gezimbll
c51122fd20 Moving apis into each subsystem packages 2023-12-13 20:33:09 +01:00
ionutboangiu
d29f84169c Move cdrs to its own package
Moved engine/cdr.go to utils/cdr.go.
Moved engine/cdrs.go and engine/cdrs_test.go to cdrs package.
Moved api functions from cdrs/cdrs.go to cdrs/apis.go. Same for the
tests.
Deleted CDRsV1 type and its methods.
2023-12-12 10:09:18 +01:00
gezimbll
cc07c5366a Revise integration tests 2023-11-29 16:25:18 +01:00
ionutboangiu
1ef2afaa97 Update/remove dependencies
Remove cenkalti/rpc2 dependency and update client constructor.
Commented tests that only start and stop engine.

Fixed compilation errors caused by Azure/go-amqp update.

Remove cgrates/ugocodec dependency since we have everything
we need in ugoriji/go/codec and add tests for it.
2023-11-15 14:03:21 +01:00
ionutboangiu
46e39770a1 Replace deprecated Publish method with PublishWithContext 2023-10-27 18:52:05 +02:00
ionutboangiu
7fd7167aa5 Update expected value in kafka it test 2023-10-26 16:26:27 +02:00
ionutboangiu
d0a435aa6d Migrate to new jetstream API
Upgraded go.mod nats version due to an issue caused by version mismatch
between driver and server (uncertain).

Renamed function from getProcessOptions to getProcessedOptions.

## *NatsER.Serve

- Replaced ChanQueueSubscribe with QueueSubscribe for Core NATS consumer
to handle the message processing directly.

- Since QueueSubscribe is now used regardless of jetstream status, the
message handler has been assigned to a separate variable that can be
reused.

-  The message handler is now dealing with the message processing
directly, therefore the select case listening for the channel which is
feeding NATS messages can be removed together with the channel itself
and the select. Currently, the goroutine within Serve only has to block
until the rdrExit chan is closed.

- Moved the resource check inside the handler right before starting the
message processing goroutine.

## *NatsEE.parseOpts

- Renamed function from parseOpt to parseOpts.

- Handled the error coming from GetNatsOpts function.

## *NatsEE.Connect

- Updated function to return early in case of non-nil nats.Conn value
to reduce nesting.

## *NatsEE.ExportEvent

- Use defer to release resources and RUnlock.

## *NatsEE.Close

- Use defer to Unlock.

- Update function to return early in case of nil nats.Conn value to
reduce nesting.

## ees.GetNatsOpts

- Chose switch over if else when parsing client certificate and keys
opts.

- Updated function to return the errors directly instead of assigning
them to a separate variable right before returning.

## ers.GetNatsOpts

- Chose switch over if else when parsing client certificate and keys
opts.

- Updated function to return the errors directly instead of assigning
them to a separate variable right before returning.

Removed tab from commented natsJetStreamMaxWaitProcessed option
value in config_defaults.go under ers section.

Added integration test for ERs NATS.

Updated ees/ers implementation to use the jetstream package which
separates the jetstream context from Core NATS.

Removed the jsOpts fields from the NatsEE struct. We are now using the
jetStreamMaxWait option directly through a timeout context.

Added streamName option for NATS reader since it is now required to be
specified when creating a consumer (it is not inferred based on subject
anymore).

Updated nats ers integration tests.

Updated tests to also use the new jetstream package.

Updated tests to start the nats-server using their official driver
instead of using the std go exec package. time.Sleeps are now not
required anymore to wait for the server.

In test configurations for nats readers, made sure that natsStreamName
option is populated. It is now required for consumers to know where to
subscribe.
2023-09-28 20:48:39 +02:00
gezimbll
990feb0f26 fixing tests for ees 2023-08-02 16:49:33 +02:00
gezimbll
fcc9fc109b Updated go-elasticsearch client 2023-07-04 13:18:54 +02:00
ionutboangiu
113e2a2bdf Replace interface{} with any 2023-05-31 10:22:28 +02:00
ionutboangiu
3e22cef9cb Revise integration tests after StorDB addition 2023-05-03 10:05:28 +02:00
ionutboangiu
8620b23231 Implement EventExporterCfg constructor and get rid of boilerplate code 2023-03-08 19:12:48 +01:00
ionutboangiu
db3ff231c6 Add options for SASL PLAIN auth (amqp 1.0) 2023-02-22 18:21:10 +01:00
ionutboangiu
73dd31a8ca Update to latest amqp 1.0 package version and fix compilation errors 2023-02-22 18:21:10 +01:00
ionutboangiu
85f58d38bd Add integration tests for amqp exporter 2023-02-21 18:26:35 +01:00
ionutboangiu
20750d330f Add integration tests for amqpv1 exporter 2023-02-21 18:26:35 +01:00
ionutboangiu
3f11195bbe Revise kafka integration test 2023-02-21 18:26:35 +01:00
arberkatellari
8518419a32 Move from streadway/amqp to rabbitmq/amqp091-go 2023-02-08 11:23:59 +01:00
ionutboangiu
ce512854f2 Port sqs and s3 tests to 1.0 2023-01-23 17:10:34 +01:00
adi
734776b113 Unified consts of opts 2022-10-03 18:29:24 +03:00
ionutboangiu
5056400751 Add kafka exporter option that signals whether or not to attempt TLS connection 2022-08-24 09:32:23 +03:00
ionutboangiu
f66f05d0e3 Add support for kafka ssl encryption 2022-08-24 09:32:23 +03:00
ionutboangiu
0653e9b5d7 Apply go fmt 2022-08-24 09:32:23 +03:00
adi
0eb61c965a Efs tests + improves 2022-07-30 08:19:08 +02:00
adi
a448fb2c7a INtegrated efs in logger/ees + ers changes 2022-07-30 08:19:08 +02:00
adi
da358161a7 EFs service to logger/ees and APIS 2022-07-30 08:19:08 +02:00
adi
2d5d01a664 Replayed failed loggs improvements 2022-07-12 16:25:28 +02:00
adi
bf870b1e2b Failover ees/loggers improved + tests 2022-07-11 17:27:46 +02:00
ionutboangiu
924a91c749 Change SSLMode to PgSSLMode 2022-07-03 13:08:52 +02:00
ionutboangiu
5437b3a8a2 Repair compilation errors after library updates 2022-07-03 13:08:52 +02:00
ionutboangiu
70ea038f08 Update FibDuration function 2022-07-03 13:08:52 +02:00
adi
e1b5ef2c4c Improved tests 2022-06-29 12:00:42 +02:00
adi
f562de49df ExtraData for exporters interface 2022-06-29 12:00:42 +02:00
ionutboangiu
1398cf3fd2 Add it test for kafka exporter 2022-05-10 17:05:31 +02:00
ionutboangiu
fb354a04a4 Add blocker for exporters + tests 2022-05-06 20:49:11 +02:00
porosnicuadrian
8e7c7d1c75 Improved chargers reply for attributes 2022-04-20 10:35:59 +02:00
nickolasdaniel
e307bd82ef Tests for coverage 2022-03-23 07:37:26 +01:00
nickolasdaniel
2629732de1 Fixed test file 2022-03-18 11:59:39 +01:00
nickolasdaniel
d4f6086322 Tested RPC EEs 2022-03-18 11:59:39 +01:00
andronache98
ecdf5e54ea Changed headers 2022-03-09 14:14:30 +01:00
andronache98
9ec56f5155 Changed headers 2022-03-09 14:14:30 +01:00
andronache98
74d8a61c15 Repaired most integration tests using storDB 2022-03-09 14:14:30 +01:00
ionutboangiu
97c8d982be Add RPCAPIOpts for ees 2022-03-02 18:05:35 +02:00
porosnicuadrian
c7092cc0df Renamed AteredFields + updated uniqueALteredFields method 2022-03-01 15:51:07 +02:00
porosnicuadrian
75fc37db2c renamed into Filters + uniqueAlteredFields 2022-02-25 14:38:26 +01:00
porosnicuadrian
bf5c694ecd Combined matchedProfile and alteredField for attributes 2022-02-24 17:28:38 +01:00