add certs test

This commit is contained in:
Mothiki 2017-12-07 17:26:14 -08:00
parent 7980d7cad7
commit beb8edc35f
3 changed files with 47 additions and 22 deletions

View file

@ -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()), 1)
}
func TestRealisClient_CreateJob_Thermos(t *testing.T) {
job := realis.NewJob().