Skip to content

Commit

Permalink
Add mutli-stage test case
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Dec 4, 2018
1 parent 51dca13 commit 1aac165
Show file tree
Hide file tree
Showing 3 changed files with 316 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pkg/await/apps_statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ type statefulsetInitAwaiter struct {
replicasReady bool
currentGeneration int64

statefulsetErrors map[string]string

statefulset *unstructured.Unstructured
pods map[string]*unstructured.Unstructured
currentReplicas int64
Expand All @@ -118,8 +116,6 @@ func makeStatefulSetInitAwaiter(c updateAwaitConfig) *statefulsetInitAwaiter {
// NOTE: Generation 0 is invalid, so this is a good sentinel value.
currentGeneration: 0,

statefulsetErrors: map[string]string{},

statefulset: c.currentOutputs,
pods: map[string]*unstructured.Unstructured{},
}
Expand Down Expand Up @@ -295,7 +291,6 @@ func (sia *statefulsetInitAwaiter) processStatefulSetEvent(event watch.Event) {
}

// Start over, prove that rollout is complete.
sia.statefulsetErrors = map[string]string{}
sia.revisionReady = false
sia.replicasReady = false

Expand Down Expand Up @@ -436,9 +431,6 @@ func (sia *statefulsetInitAwaiter) aggregatePodErrors() ([]string, []string) {

func (sia *statefulsetInitAwaiter) errorMessages() []string {
messages := make([]string, 0)
for _, message := range sia.statefulsetErrors {
messages = append(messages, message)
}

if !sia.replicasReady {
messages = append(messages,
Expand Down
Loading

0 comments on commit 1aac165

Please sign in to comment.