tests updated
parent
775fcc10f9
commit
3bf3f9852c
|
@ -4,6 +4,8 @@ import (
|
|||
"k8s.io/helm/pkg/helm"
|
||||
"k8s.io/helm/pkg/proto/hapi/chart"
|
||||
rls "k8s.io/helm/pkg/proto/hapi/services"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
)
|
||||
|
||||
// TillerAddress - default tiller address
|
||||
|
@ -26,6 +28,8 @@ type HelmImplementer struct {
|
|||
func NewHelmImplementer(address string) *HelmImplementer {
|
||||
if address == "" {
|
||||
address = TillerAddress
|
||||
} else {
|
||||
log.Infof("provider.helm: tiller address '%s' supplied", address)
|
||||
}
|
||||
|
||||
return &HelmImplementer{
|
||||
|
|
|
@ -3,9 +3,12 @@ package http
|
|||
import (
|
||||
"bytes"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/rusenask/keel/approvals"
|
||||
"github.com/rusenask/keel/cache/memory"
|
||||
"github.com/rusenask/keel/provider"
|
||||
// "github.com/rusenask/keel/types"
|
||||
"github.com/rusenask/keel/util/codecs"
|
||||
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
@ -41,7 +44,9 @@ var fakeRequest = `{
|
|||
func TestDockerhubWebhookHandler(t *testing.T) {
|
||||
|
||||
fp := &fakeProvider{}
|
||||
providers := provider.New([]provider.Provider{fp})
|
||||
mem := memory.NewMemoryCache(100*time.Millisecond, 100*time.Millisecond, 10*time.Millisecond)
|
||||
am := approvals.New(mem, codecs.DefaultSerializer())
|
||||
providers := provider.New([]provider.Provider{fp}, am)
|
||||
srv := NewTriggerServer(&Opts{Providers: providers})
|
||||
srv.registerRoutes(srv.router)
|
||||
|
||||
|
|
|
@ -3,9 +3,13 @@ package http
|
|||
import (
|
||||
"bytes"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/rusenask/keel/approvals"
|
||||
"github.com/rusenask/keel/cache/memory"
|
||||
"github.com/rusenask/keel/provider"
|
||||
"github.com/rusenask/keel/types"
|
||||
"github.com/rusenask/keel/util/codecs"
|
||||
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
@ -37,7 +41,9 @@ func TestNativeWebhookHandler(t *testing.T) {
|
|||
|
||||
fp := &fakeProvider{}
|
||||
|
||||
providers := provider.New([]provider.Provider{fp})
|
||||
mem := memory.NewMemoryCache(100*time.Millisecond, 100*time.Millisecond, 10*time.Millisecond)
|
||||
am := approvals.New(mem, codecs.DefaultSerializer())
|
||||
providers := provider.New([]provider.Provider{fp}, am)
|
||||
|
||||
srv := NewTriggerServer(&Opts{Providers: providers})
|
||||
srv.registerRoutes(srv.router)
|
||||
|
@ -64,7 +70,9 @@ func TestNativeWebhookHandler(t *testing.T) {
|
|||
func TestNativeWebhookHandlerNoRepoName(t *testing.T) {
|
||||
|
||||
fp := &fakeProvider{}
|
||||
providers := provider.New([]provider.Provider{fp})
|
||||
mem := memory.NewMemoryCache(100*time.Millisecond, 100*time.Millisecond, 10*time.Millisecond)
|
||||
am := approvals.New(mem, codecs.DefaultSerializer())
|
||||
providers := provider.New([]provider.Provider{fp}, am)
|
||||
srv := NewTriggerServer(&Opts{Providers: providers})
|
||||
srv.registerRoutes(srv.router)
|
||||
|
||||
|
|
|
@ -3,8 +3,12 @@ package http
|
|||
import (
|
||||
"bytes"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/rusenask/keel/approvals"
|
||||
"github.com/rusenask/keel/cache/memory"
|
||||
"github.com/rusenask/keel/provider"
|
||||
"github.com/rusenask/keel/util/codecs"
|
||||
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
@ -25,7 +29,9 @@ var fakeQuayWebhook = `{
|
|||
func TestQuayWebhookHandler(t *testing.T) {
|
||||
|
||||
fp := &fakeProvider{}
|
||||
providers := provider.New([]provider.Provider{fp})
|
||||
mem := memory.NewMemoryCache(100*time.Millisecond, 100*time.Millisecond, 10*time.Millisecond)
|
||||
am := approvals.New(mem, codecs.DefaultSerializer())
|
||||
providers := provider.New([]provider.Provider{fp}, am)
|
||||
srv := NewTriggerServer(&Opts{Providers: providers})
|
||||
srv.registerRoutes(srv.router)
|
||||
|
||||
|
|
Loading…
Reference in New Issue