fix tests
This commit is contained in:
parent
71f9ea8561
commit
f41a2e562a
2
Makefile
2
Makefile
|
@ -31,7 +31,7 @@ testacc: generate
|
|||
|
||||
# testrace runs the race checker
|
||||
testrace: generate
|
||||
TF_ACC= godep go test -race $(TEST) $(TESTARGS)
|
||||
CGO_ENABLED=1 TF_ACC= godep go test -race $(TEST) $(TESTARGS)
|
||||
|
||||
cover:
|
||||
./scripts/coverage.sh --html
|
||||
|
|
|
@ -169,7 +169,7 @@ func TestBackend_RSARoles(t *testing.T) {
|
|||
Steps: []logicaltest.TestStep{
|
||||
logicaltest.TestStep{
|
||||
Operation: logical.WriteOperation,
|
||||
Path: "config/ca/set",
|
||||
Path: "config/ca",
|
||||
Data: map[string]interface{}{
|
||||
"pem_bundle": rsaCAKey + rsaCACert,
|
||||
},
|
||||
|
@ -212,7 +212,7 @@ func TestBackend_ECRoles(t *testing.T) {
|
|||
Steps: []logicaltest.TestStep{
|
||||
logicaltest.TestStep{
|
||||
Operation: logical.WriteOperation,
|
||||
Path: "config/ca/set",
|
||||
Path: "config/ca",
|
||||
Data: map[string]interface{}{
|
||||
"pem_bundle": ecCAKey + ecCACert,
|
||||
},
|
||||
|
@ -537,7 +537,7 @@ func generateCATestingSteps(t *testing.T, caCert, caKey, otherCaCert string, int
|
|||
ret := []logicaltest.TestStep{
|
||||
logicaltest.TestStep{
|
||||
Operation: logical.WriteOperation,
|
||||
Path: "config/ca/set",
|
||||
Path: "config/ca",
|
||||
Data: map[string]interface{}{
|
||||
"pem_bundle": caKey + caCert,
|
||||
},
|
||||
|
@ -615,7 +615,7 @@ func generateCATestingSteps(t *testing.T, caCert, caKey, otherCaCert string, int
|
|||
// Here, just the cert
|
||||
logicaltest.TestStep{
|
||||
Operation: logical.WriteOperation,
|
||||
Path: "config/ca/set",
|
||||
Path: "config/ca",
|
||||
Data: map[string]interface{}{
|
||||
"pem_bundle": caCert,
|
||||
},
|
||||
|
@ -625,7 +625,7 @@ func generateCATestingSteps(t *testing.T, caCert, caKey, otherCaCert string, int
|
|||
// Here, just the key
|
||||
logicaltest.TestStep{
|
||||
Operation: logical.WriteOperation,
|
||||
Path: "config/ca/set",
|
||||
Path: "config/ca",
|
||||
Data: map[string]interface{}{
|
||||
"pem_bundle": caKey,
|
||||
},
|
||||
|
@ -713,7 +713,7 @@ func generateCATestingSteps(t *testing.T, caCert, caKey, otherCaCert string, int
|
|||
// Re-load the root key in so we can sign it
|
||||
logicaltest.TestStep{
|
||||
Operation: logical.WriteOperation,
|
||||
Path: "config/ca/set",
|
||||
Path: "config/ca",
|
||||
Data: reqdata,
|
||||
Check: func(resp *logical.Response) error {
|
||||
delete(reqdata, "pem_bundle")
|
||||
|
@ -744,7 +744,7 @@ func generateCATestingSteps(t *testing.T, caCert, caKey, otherCaCert string, int
|
|||
// First load in this way to populate the private key
|
||||
logicaltest.TestStep{
|
||||
Operation: logical.WriteOperation,
|
||||
Path: "config/ca/set",
|
||||
Path: "config/ca",
|
||||
Data: reqdata,
|
||||
Check: func(resp *logical.Response) error {
|
||||
delete(reqdata, "pem_bundle")
|
||||
|
@ -849,7 +849,7 @@ func generateCATestingSteps(t *testing.T, caCert, caKey, otherCaCert string, int
|
|||
|
||||
logicaltest.TestStep{
|
||||
Operation: logical.WriteOperation,
|
||||
Path: "config/ca/set",
|
||||
Path: "config/ca",
|
||||
Data: reqdata,
|
||||
Check: func(resp *logical.Response) error {
|
||||
delete(reqdata, "pem_bundle")
|
||||
|
@ -880,7 +880,7 @@ func generateCATestingSteps(t *testing.T, caCert, caKey, otherCaCert string, int
|
|||
// First load in this way to populate the private key
|
||||
logicaltest.TestStep{
|
||||
Operation: logical.WriteOperation,
|
||||
Path: "config/ca/set",
|
||||
Path: "config/ca",
|
||||
Data: reqdata,
|
||||
Check: func(resp *logical.Response) error {
|
||||
delete(reqdata, "pem_bundle")
|
||||
|
|
|
@ -327,33 +327,37 @@ func TestTLSConfig(t *testing.T) {
|
|||
}
|
||||
|
||||
func refreshRSACertBundle() *CertBundle {
|
||||
return &CertBundle{
|
||||
ret := &CertBundle{
|
||||
Certificate: certRSAPem,
|
||||
PrivateKey: privRSAKeyPem,
|
||||
IssuingCA: issuingCaPem,
|
||||
}
|
||||
ret.PrivateKey = privRSAKeyPem
|
||||
return ret
|
||||
}
|
||||
|
||||
func refreshECCertBundle() *CertBundle {
|
||||
return &CertBundle{
|
||||
ret := &CertBundle{
|
||||
Certificate: certECPem,
|
||||
PrivateKey: privECKeyPem,
|
||||
IssuingCA: issuingCaPem,
|
||||
}
|
||||
ret.PrivateKey = privECKeyPem
|
||||
return ret
|
||||
}
|
||||
|
||||
func refreshRSACSRBundle() *CSRBundle {
|
||||
return &CSRBundle{
|
||||
CSR: csrRSAPem,
|
||||
PrivateKey: privRSAKeyPem,
|
||||
ret := &CSRBundle{
|
||||
CSR: csrRSAPem,
|
||||
}
|
||||
ret.PrivateKey = privRSAKeyPem
|
||||
return ret
|
||||
}
|
||||
|
||||
func refreshECCSRBundle() *CSRBundle {
|
||||
return &CSRBundle{
|
||||
CSR: csrECPem,
|
||||
PrivateKey: privECKeyPem,
|
||||
ret := &CSRBundle{
|
||||
CSR: csrECPem,
|
||||
}
|
||||
ret.PrivateKey = privECKeyPem
|
||||
return ret
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
Loading…
Reference in a new issue