Skip to content

Latest commit

 

History

History
59 lines (34 loc) · 2.86 KB

File metadata and controls

59 lines (34 loc) · 2.86 KB

Testing approach

Contrived local integration testing

Offline invocations of stackql are assessed against expected responses, through:

  1. the functionality of /test/deprecated/python/main.py.
  2. robot tests, per this document.

(1) is deprecated and will be entirely migrated to (2).

These tests are run during the build process:

Unit tests using standard golang approaches

Proliferation is a fair way behind development.

These are also run inside build processes: local and remote.

E2E integration tests

TBA.

Sundry opinions about testing in golang

Benchmarks

Benchmarks with go test

go test -run='^$' -bench . -count=3 ./... > cicd/log/current-bench.txt

Manual benchmarks

First, you will need to start aws mocks as per the mock server example.

export workspaceFolder="/path/to/repository/root"

cd $workspaceFolder/build

## experiment
time ./stackql exec --registry="{ \"url\": \"file://${workspaceFolder}/test/registry-mocked\", \"localDocRoot\": \"${workspaceFolder}/test/registry-mocked\", \"verifyConfig\": { \"nopVerify\": true } }" --auth="{ \"google\": { \"credentialsfilepath\": \"${workspaceFolder}/test/assets/credentials/dummy/google/functional-test-dummy-sa-key.json\" } }" --tls.allowInsecure "select  instanceId,  ipAddress  from aws.ec2.instances  where  instanceId not in ('some-silly-id')   and region in (   'ap-southeast-2',    'ap-southeast-1',   'ap-northeast-1',   'ap-northeast-2',   'ap-south-1',   'ap-east-1',   'ap-northeast-3',   'eu-central-1',   'eu-west-1',   'eu-west-2',   'eu-west-3',   'eu-north-1',   'sa-east-1',   'us-east-1',   'us-east-2',   'us-west-1',   'us-west-2'  ) ;"

## control
time ./stackql exec --registry="{ \"url\": \"file://${workspaceFolder}/test/registry-mocked\", \"localDocRoot\": \"${workspaceFolder}/test/registry-mocked\", \"verifyConfig\": { \"nopVerify\": true } }" --auth="{ \"google\": { \"credentialsfilepath\": \"${workspaceFolder}/test/assets/credentials/dummy/google/functional-test-dummy-sa-key.json\" } }" --tls.allowInsecure "select  instanceId,  ipAddress  from aws.ec2.instances  where  instanceId not in ('some-silly-id')   and region =  'ap-southeast-2' ;"