Skip to content
This repository has been archived by the owner on Feb 14, 2022. It is now read-only.

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Ferquel <[email protected]>
  • Loading branch information
simonferquel committed Jan 29, 2019
1 parent 8b0f4c2 commit cb0fdc2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/controller/stackreconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,20 @@ func (u *testResourceUpdater) deleteSecretsAndConfigMaps() error {
return nil
}

type reconiliationTestCaseResult struct {
type reconciliationTestCaseResult struct {
diffs []*diff.StackStateDiff
statuses []*latest.Stack
childResourceDeletions int
}

func runReconcilierTestCase(originalStack *latest.Stack, defaultServiceType coretypes.ServiceType, operation func(*StackReconciler),
originalState ...interface{}) (reconiliationTestCaseResult, error) {
originalState ...interface{}) (reconciliationTestCaseResult, error) {
cache := &dummyOwnerCache{
data: make(map[string]stackOwnerCacheEntry),
}
childrenStore, err := newTestChildrenStore(originalState...)
if err != nil {
return reconiliationTestCaseResult{}, err
return reconciliationTestCaseResult{}, err
}
stackStore := newTestStackStore(originalStack)
chDiffs := make(chan *diff.StackStateDiff)
Expand Down Expand Up @@ -142,7 +142,7 @@ func runReconcilierTestCase(originalStack *latest.Stack, defaultServiceType core
close(chDiffs)
close(chStatusUpdates)
close(chChildrenDeletions)
return reconiliationTestCaseResult{}, err
return reconciliationTestCaseResult{}, err
}

operation(testee)
Expand All @@ -151,18 +151,18 @@ func runReconcilierTestCase(originalStack *latest.Stack, defaultServiceType core
close(chStatusUpdates)
close(chChildrenDeletions)
wg.Wait()
return reconiliationTestCaseResult{childResourceDeletions: childrenResourceDeletions, diffs: producedDiffs, statuses: producedStatusUpdates}, nil
return reconciliationTestCaseResult{childResourceDeletions: childrenResourceDeletions, diffs: producedDiffs, statuses: producedStatusUpdates}, nil
}

func runReconciliationTestCase(originalStack *latest.Stack, defaultServiceType coretypes.ServiceType,
originalState ...interface{}) (reconiliationTestCaseResult, error) {
originalState ...interface{}) (reconciliationTestCaseResult, error) {
return runReconcilierTestCase(originalStack, defaultServiceType, func(testee *StackReconciler) {
testee.reconcileStack(stackresources.ObjKey(originalStack.Namespace, originalStack.Name))
}, originalState...)
}

func runRemoveStackTestCase(originalStack *latest.Stack, defaultServiceType coretypes.ServiceType,
originalState ...interface{}) (reconiliationTestCaseResult, error) {
originalState ...interface{}) (reconciliationTestCaseResult, error) {
return runReconcilierTestCase(originalStack, defaultServiceType, func(testee *StackReconciler) {
testee.deleteStackChildren(originalStack)
}, originalState...)
Expand Down

0 comments on commit cb0fdc2

Please sign in to comment.