Skip to content

Commit

Permalink
Update README to include info about setting up env
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Nov 15, 2016
1 parent f116097 commit 3d4b91f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,20 @@ upstream [email protected]:joyent/gocommon.git (push)

### Run Tests

The library needs values for the `SDC_URL`, `MANTA_URL`, `MANTA_KEY_ID` and `SDC_KEY_ID` environment variables even though the tests are run locally. You can generate a temporary key and use its fingerprint for tests without adding the key to your Triton Cloud account.

```
# create a temporary key
ssh-keygen -b 2048 -C "Testing Key" -f /tmp/id_rsa -t rsa -P ""
# set up environment
# note: leave the -E md5 argument off on older ssh-keygen
export KEY_ID=$(ssh-keygen -E md5 -lf /tmp/id_rsa | awk -F' ' '{print $2}' | cut -d':' -f2-)
export SDC_KEY_ID=${KEY_ID}
export MANTA_KEY_ID=${KEY_ID}
export SDC_URL=https://us-east-1.api.joyent.com
export MANTA_URL=https://us-east.manta.joyent.com
cd ${GOPATH}/src/github.com/joyent/gocommon
go test ./...
```
Expand Down

0 comments on commit 3d4b91f

Please sign in to comment.