make insecureskipverify configurable (#40)
* make inseucreskipverify configurable * add insecure and certspath to configs * add certs test * add config support for client key and cert
This commit is contained in:
parent
dd804af0a8
commit
d4027bc95c
5 changed files with 170 additions and 26 deletions
|
@ -16,13 +16,14 @@ package realis_test
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/paypal/gorealis"
|
||||
"github.com/paypal/gorealis/gen-go/apache/aurora"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/paypal/gorealis"
|
||||
"github.com/paypal/gorealis/gen-go/apache/aurora"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var r realis.Realis
|
||||
|
@ -63,6 +64,13 @@ func TestLeaderFromZK(t *testing.T) {
|
|||
assert.Equal(t, url, "http://aurora.local:8081")
|
||||
}
|
||||
|
||||
func TestGetCacerts(t *testing.T) {
|
||||
certs, err := realis.Getcerts("./examples/certs")
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, len(certs.Subjects()), 2)
|
||||
|
||||
}
|
||||
|
||||
func TestRealisClient_CreateJob_Thermos(t *testing.T) {
|
||||
|
||||
job := realis.NewJob().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue