-
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.
Merge pull request #11 from tgross/gh10
Set up TLS for TestDefaultClientRejectSelfSigned
- Loading branch information
Showing
6 changed files
with
72 additions
and
10 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 |
---|---|---|
|
@@ -18,9 +18,10 @@ _cgo_gotypes.go | |
_cgo_export.* | ||
|
||
_testmain.go | ||
*.test | ||
|
||
*.exe | ||
|
||
# IntelliJ files | ||
.idea | ||
*.iml | ||
*.iml |
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 |
---|---|---|
|
@@ -3,6 +3,8 @@ gocommon | |
|
||
Common Go library for Joyent's Triton and Manta. | ||
|
||
[![wercker status](https://app.wercker.com/status/2f63bf7f68bfdd46b979abad19c0bee0/s/master "wercker status")](https://app.wercker.com/project/byKey/2f63bf7f68bfdd46b979abad19c0bee0) | ||
|
||
## Installation | ||
|
||
Use `go-get` to install gocommon. | ||
|
@@ -70,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 ./... | ||
``` | ||
|
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
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
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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
box: golang | ||
|
||
build: | ||
steps: | ||
# Sets the go workspace and places you package | ||
# at the right place in the workspace tree | ||
- setup-go-workspace: | ||
package-dir: github.com/joyent/gocommon | ||
|
||
# Gets the dependencies | ||
- script: | ||
name: go get | ||
code: | | ||
go get -v -t ./... | ||
# Build the project | ||
- script: | ||
name: go build | ||
code: | | ||
go build ./... | ||
- script: | ||
name: make a new key for testing | ||
code: | | ||
ssh-keygen -b 2048 \ | ||
-C "Testing Key" \ | ||
-f /root/.ssh/id_rsa \ | ||
-t rsa \ | ||
-P "" | ||
# Test the project | ||
- script: | ||
name: go test | ||
code: | | ||
export KEY_ID=$(ssh-keygen -lf /root/.ssh/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 | ||
go test ./... |