Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.

Commit

Permalink
Merge pull request #73 from rebuy-de/fix-waiter
Browse files Browse the repository at this point in the history
fix waiter
  • Loading branch information
svenwltr authored Aug 4, 2017
2 parents decd489 + 789562b commit 8eac3d5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewDeploymentWaitInterceptor(client kubernetes.Interface) *DeploymentWaitIn
}
}

func (dwi *DeploymentWaitInterceptor) AllManifestsApplied([]runtime.Object) error {
func (dwi *DeploymentWaitInterceptor) PostApply([]runtime.Object) error {
dwi.waitgroup.Wait()
dwi.cancel()
return nil
Expand All @@ -51,7 +51,7 @@ func (dwi *DeploymentWaitInterceptor) Close() error {
return nil
}

func (dwi *DeploymentWaitInterceptor) ManifestApplied(obj runtime.Object) error {
func (dwi *DeploymentWaitInterceptor) PreManifestApply(obj runtime.Object) error {
deployment, ok := obj.(*v1beta1.Deployment)
if !ok {
return nil
Expand Down
25 changes: 25 additions & 0 deletions pkg/interceptors/waiter/interceptors_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package waiter

import (
"testing"

"github.com/rebuy-de/kubernetes-deployment/pkg/interceptors"
)

func TestTypePostApplier(t *testing.T) {
var inter interceptors.PostApplier
inter = &DeploymentWaitInterceptor{}
_ = inter
}

func TestTypePreManifestApplier(t *testing.T) {
var inter interceptors.PreManifestApplier
inter = &DeploymentWaitInterceptor{}
_ = inter
}

func TestTypeCloser(t *testing.T) {
var inter interceptors.Closer
inter = &DeploymentWaitInterceptor{}
_ = inter
}

0 comments on commit 8eac3d5

Please sign in to comment.