1.0.0 • Published 5 years ago

checkit-hub-tests v1.0.0

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
5 years ago

checkit-hub-tests

Various test suites designed to test the hub functionality

Dependencies: Node v10.15.3 and NPM v6.4.1

API tests

For these tests to run, the following environment variables are needed:

CHECKIT_ENV='<InsertEnvironmentNameHere>'
CHECK_HUB_IP='<InsertHubIpAddressHere>'
DEBUG='e2e,checkit-hub-fixtures,hub-fixture-tests,hub-ws'
HUB_FIXTURE_APPPATH='~/workspace/checkit-hub-tests/node_modules/@checkit/checkit-hub-fixtures/node_modules/checkit-webengine' # It should point to the webengine module of checkit-hub-tests
HUB_FIXTURE_CLOUD_API_HOST='api-<InsertEnvironmentNameHere>.elektron-dev.com'
HUB_FIXTURE_DBFIXTURE=false
HUB_FIXTURE_DEBUG_MODE=true
HUB_FIXTURE_ENV='hw'
HUB_FIXTURE_HW_PORT=80
HUB_FIXTURE_HW_PROTOCOL=http
HUB_FIXTURE_HW_URI='<InsertHubIpAddress>'
HUB_FIXTURE_MUTE='no'
HUB_FIXTURE_SSH_PASSWORD='<InsertHubSshPasswordHere>'
HUB_FIXTURE_WS_PSW='t3aNm4sJVtkCrFsj' # It should be the Hub UI admin password
HUB_FIXTURE_WS_USER='admin'
HUB_MQTT_CERT='<InsertHubCertsFolderHere>' # e.g. ~/hub_certificates_7878-7878-7878-7878
HUB_MQTT_PASS='mqttpassword'
HUB_MQTT_USER='mqttuser'
// The serial number used when running the automated tests needs to be different than the Hub's serial number as this will cause MQTT connection issues
SERIAL_NUMBER=7878-7878-7878-7878

Hub swap-out tests

These tests are run of a different Hub and need a different set of environment variables

CHECK_HUB_IP='<InsertHubIpAddressHere>'
CHECKIT_ENV='checkit-ci-develop'
DATABASE_DIR="${env.WORKSPACE}"
DEBUG='e2e,checkit-hub-fixtures,hub-fixture-tests,hub-ws'
HUB_FIXTURE_APPPATH="${env.WORKSPACE}/node_modules/checkit-webengine"
HUB_FIXTURE_CLOUD_API_HOST='api-checkit-ci-develop.elektron-dev.com'
HUB_FIXTURE_DBENABLE='true'
HUB_FIXTURE_MONGODB_URI="mongodb://checkit-ci-develop-checkit:password@mongo-test-cluster-00.checkit.awsinternal:27000,mongo-test-cluster-01.checkit.awsinternal:27000,mongo-test-cluster-02.checkit.awsinternal:27000/checkit-ci-develop-checkit?replicaSet=test"
HUB_FIXTURE_MONGODB_DBNAME='checkit-ci-develop-checkit'
HUB_FIXTURE_DBFIXTURE='false'
HUB_FIXTURE_DEBUG_MODE='true'
HUB_FIXTURE_ENV='hw'
HUB_FIXTURE_HW_PORT=80
HUB_FIXTURE_HW_PROTOCOL='http'
HUB_FIXTURE_HW_URI='<InsertHubIpAddress>'
HUB_FIXTURE_MUTE='no'
HUB_FIXTURE_SSH_PASSWORD='c82c229b85'
HUB_FIXTURE_WS_PSW='t3aNm4sJVtkCrFsj'
HUB_FIXTURE_WS_USER='admin'
HUB_MQTT_CERT='<InsertHubCertsFolderHere>' # e.g. ~/hub_certificates_7878-7878-7878-7878
HUB_MQTT_PASS='mqttpassword'
HUB_MQTT_USER='mqttuser'
JUNIT_REPORT_PATH='./artifacts/test/unit'
NODE_ENV='test'
SERIAL_NUMBER='7878-7878-7878-7878'