- added hook support (executed after parsing config but before starting
engine)
- made db resets configurable
- merged config parsing helper with the main Setup function
- renamed TestEnvironment.Setup -> TestEngine.Run as it represents the
setup for a single cgr-engine instance
- removed engineDelay parameter. Added helper to wait up to 200ms for
the APIerSv1 service to be up and running to prevent 'can't find
service' errors.
- replaced t.Log with t.Error for engine process kill error
- improved option comments
- Pass the testing.T variable to all the helpers.
- Fail directly using t.Fatal instead of returning errors and
checking them in the parent function.
- Use t.Cleanup to ensure engine is closed after the test instead
of returning a shutdown function and using it with defer.
- Use t.TempDir to create temporary directories for configuration
and tariffplans
- Add t.Helper() method call to all helper functions.
Constructor looks inside the params' balance map for the Factors key.
It expects either a string representing a JSON serialized map or the
map itself.
BalanceFilter Clone function has been updated to set a deep copy of
the original Factors map instead of a shallow one.
BalanceFilter getter function for Factors now returns nil instead of
an empty map. It's slightly more memory efficient and assignment to
this map will not be attempted, so it's panic proof.
BalanceFilter.ModifyBalance now updates Factors only if the key is
found in the request params' Balance map. Setting Factors to null is also
possible as long as the Factors key exists and is set to null.
Note: only *set_balance can overwrite the Factors map, all the others
can only set it if the balance does exist prior to sending the request.
Update balance integration tests.
TestBalanceFactor will now test refunding to mixed balanced types.
A sleep of 10ms is called before initial acc retrieval to wait for
tps to finish loading.
It will be added to CallDescriptor in ExtraFields.
Ensure CDR ExtraFields are passed to CallDescriptor before
sending it to RALs.
Ensure Clone function of CallDescriptor also clones the
ExtraFields map.