7ce9748066
* Move public code into daml-integration-api CHANGELOG_BEGIN [DAML Integration Kit]: Removed sandbox specific code from the API intended to be used by ledger integrations. Use the maven coordinates ``com.daml:participant-integration-api:VERSION`` instead of ``com.daml:ledger-api-server`` or ``com.daml:sandbox``. CHANGELOG_END |
||
---|---|---|
.. | ||
rental | ||
.gitignore | ||
README.md |
Navigator Testing Scenarios
The scenario(s) contained in this directory are useful to quickly spin up the sandbox and navigator from HEAD
and visually inspect the navigator UI or perform other tests.
As an example, assuming your current working directory is the project root, you can:
-
open a terminal
-
change your working directory to
navigator/backend/scenarios/rental
-
build the project
daml build
-
start the sandbox and run a scenario
bazel run --run_under="cd $PWD && " \ //ledger/sandbox-classic:sandbox-classic-binary -- --scenario Main:example dist/rental.dar
-
open another terminal
-
change your working directory to
navigator/backend/scenarios/rental
-
start the navigator
bazel run --run_under="cd $PWD && " \ //navigator/backend:navigator-binary -- server
-
open a browser
-
go to
localhost:4000
-
play around
Usage with TLS
If you want to use a secure channel (e.g.: to test against an authenticated sandbox), you can use the test certificates in //ledger/test-common/test-certificates
.
To use them, run the sandbox as follows:
bazel build //ledger/test-common/test-certificates
bazel run --run_under="cd $PWD && " \
//ledger/sandbox-classic:sandbox-classic-binary -- --scenario Main:example dist/rental.dar
--pem $PWD/bazel-bin/ledger/test-common/test-certificates/server.pem --crt $PWD/bazel-bin/ledger/test-common/test-certificates/server.crt --cacrt $PWD/bazel-bin/ledger/test-common/test-certificates/ca.crt
And run navigator as follows:
bazel run --run_under="cd $PWD && " \
//navigator/backend:navigator-binary -- server \
--pem $PWD/bazel-bin/ledger/test-common/test-certificates/client.pem --crt $PWD/bazel-bin/ledger/test-common/test-certificates/client.crt --cacrt $PWD/bazel-bin/ledger/test-common/test-certificates/ca.crt