-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README to include info about setting up env
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 ./... | ||
``` | ||
|