Skip to main content

Module test_utils

Module test_utils 

Source
Expand description

Utilities for running tests against a NATS instance.

Structsยง

NatsSystemCredentials ๐Ÿ”’
Holds Keys for system- and operator account, which must match the server configuration.

Functionsยง

authenticate_as_sys ๐Ÿ”’
Attempts to create a new connection to a running NATS server, using the system user credentials. A system user (belonging to the SYS account) is the only account eligible to creating other accounts.
authenticate_via_jwt ๐Ÿ”’
Creates a NATS connection using the provided credentials
create_nats_account_for_test
Creates a new NATS account to ensure that unit tests can run concurrently without interfering with each other.