To run the SamProviderSpecs locally, you will need to make sure that you populate a couple of environment variables so
that your locally running tests know how to authenticate with the DSP DevOps hosted Pact Broker.
The credentials for authenticating with the Pact Broker can be found here:
vault read secret/dsp/pact-broker/users/read-only
On the command line, you can try the following:
source env/local.env
source src/main/resources/rendered/secrets.env
export PACT_BROKER_URL="https://pact-broker.dsp-eng-tools.broadinstitute.org/"
export PACT_BROKER_USERNAME=$(vault read -field=basic_auth_read_only_username secret/dsp/pact-broker/users/read-only)
export PACT_BROKER_PASSWORD=$(vault read -field=basic_auth_read_only_password secret/dsp/pact-broker/users/read-only)In IntelliJ, you can create a Run Configuration for SamProviderSpec.scala and save Environment Variables for:
PACT_BROKER_URLPACT_BROKER_USERNAMEPACT_BROKER_USERNAME
Or you can run the following command from the root of the project:
sbt "set scalafmtOnCompile := false" "project pact4s" "testOnly *SamProviderSpec"Publishing is disabled by default. To enable publishing, set the PACT_PUBLISH_RESULTS environment variable to true.