tree: 230843c03e4e79fd1601f5c46634b90eca4d2d85 [search]
  1. auth.ts
  2. deferred-polling.ts
  3. env.ts
  4. message.ts
  5. metadata-changes.ts
  6. raw.ts
  7. README.md
  8. resource-options.ts
  9. session.ts
  10. stream.ts
  11. topic.ts
  12. world.ts
foreign/node/src/bdd/README.md

Node.js bdd test

Node.js bdd test are run via cucumber-js. scenario are located at /bdd/scenarios

env var

the bdd test suite has no defaults and fails when any of these is missing:

  • IGGY_TCP_ADDRESS="host:port" - server address
  • IGGY_ROOT_USERNAME / IGGY_ROOT_PASSWORD - root credentials
  • IGGY_TCP_ADDRESS_NO_QUORUM="host:port" - cluster node that cannot reach quorum, read only by the session contract scenarios

Run (recommended)

from the repository root run

./scripts/run-bdd-tests.sh node

the script starts the server and sets every variable above, so none of them have to be exported by hand. see /bdd/README.md for the sdk and feature matrix.

Run locally

for iterating against a server you started yourself. note: bdd test expect an iggy-server started with the same root credentials

The stream options feature also needs the server to run with encryption enabled and a config key (IGGY_ENCRYPTION_ENABLED=true, IGGY_ENCRYPTION_KEY), as scripts/run-bdd-tests.sh starts it.

The metadata changes feature needs the same key and IGGY_METADATA_CHANGE_LOG_RESOURCE_CAPACITY=64, so its expiry scenario can push a held cursor out of the change log.

The deferred polling feature needs none of these server variables. To run only that feature, add -- --tags @deferred-polling to the command below.

from /foreign/node run

npm ci # if not already done
IGGY_TCP_ADDRESS=127.0.0.1:8090 IGGY_ROOT_USERNAME=iggy IGGY_ROOT_PASSWORD=iggy \
  npm run test:bdd