Skip to content

Commit

Permalink
modified parallel_test
Browse files Browse the repository at this point in the history
Signed-off-by: Griffin <[email protected]>
  • Loading branch information
prakrit55 committed Nov 17, 2023
1 parent 4798fce commit dc92aa1
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions pkg/reconciler/parallel/parallel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,20 @@ func TestAllBranches(t *testing.T) {
WithFlowsParallelChannelTemplateSpec(imc),
WithFlowsParallelBranches([]v1.ParallelBranch{
{Subscriber: createSubscriber(0)},
}))},
})),
createChannel(parallelName),
createBranchChannel(parallelName, 0),
resources.NewFilterSubscription(0, NewFlowsParallel(parallelName, testNS,
WithFlowsParallelChannelTemplateSpec(imc),
WithFlowsParallelBranches([]v1.ParallelBranch{
{Subscriber: createSubscriber(0)},
}))),
resources.NewSubscription(0, NewFlowsParallel(parallelName, testNS,
WithFlowsParallelChannelTemplateSpec(imc),
WithFlowsParallelBranches([]v1.ParallelBranch{
{Subscriber: createSubscriber(0)},
}))),
},
WantErr: false,
WantStatusUpdates: []clientgotesting.UpdateActionImpl{{
Object: NewFlowsParallel(parallelName, testNS,
Expand Down Expand Up @@ -623,17 +636,12 @@ func TestAllBranches(t *testing.T) {
WithInitFlowsParallelConditions,
WithFlowsParallelChannelTemplateSpec(imc),
WithFlowsParallelBranches([]v1.ParallelBranch{{Subscriber: createSubscriber(0)}}),
WithFlowsParallelChannelsNotReady("ChannelsNotReady", "Channels are not ready yet, or there are none"),
WithFlowsParallelAddressableNotReady("emptyAddress", "addressable is nil"),
WithFlowsParallelSubscriptionsNotReady("SubscriptionsNotReady", "Subscriptions are not ready yet, or there are none"),
WithFlowsParallelIngressChannelStatus(createParallelChannelStatus(parallelName, corev1.ConditionFalse)),
WithFlowsParallelOIDCIdentityCreatedFailed("Unable to resolve service account for OIDC authentication", fmt.Sprintf("service account %s not owned by Subscription %s", makeFlowParallelOIDCServiceAccountWithoutOwnerRef().Name, parallelName)),
// WithFlowsParallelChannelsNotReady("ChannelsNotReady", "Channels are not ready yet, or there are none"),
// WithFlowsParallelAddressableNotReady("emptyAddress", "addressable is nil"),
// WithFlowsParallelSubscriptionsNotReady("SubscriptionsNotReady", "Subscriptions are not ready yet, or there are none"),
// WithFlowsParallelIngressChannelStatus(createParallelChannelStatus(parallelName, corev1.ConditionFalse)),
WithFlowsParallelOIDCIdentityCreatedFailed("Unable to resolve service account for OIDC authentication", fmt.Sprintf("service account %s not owned by Parallel %s", makeFlowParallelOIDCServiceAccountWithoutOwnerRef().Name, parallelName)),
WithFlowsParallelOIDCServiceAccountName(makeFlowParallelOIDCServiceAccountWithoutOwnerRef().Name),
WithFlowsParallelBranchStatuses([]v1.ParallelBranchStatus{{
FilterSubscriptionStatus: createParallelFilterSubscriptionStatus(parallelName, 0, corev1.ConditionFalse),
FilterChannelStatus: createParallelBranchChannelStatus(parallelName, 0, corev1.ConditionFalse),
SubscriptionStatus: createParallelSubscriptionStatus(parallelName, 0, corev1.ConditionFalse),
}}),
),
}},
WantEvents: []string{
Expand Down

0 comments on commit dc92aa1

Please sign in to comment.