tadayosi commented on code in PR #3382:
URL: https://github.com/apache/camel-k/pull/3382#discussion_r904510416
##########
e2e/support/test_support.go:
##########
@@ -1151,12 +1234,12 @@ func Platform(ns string) func() *v1.IntegrationPlatform
{
continue
}
if pl != nil {
- panic("multiple primary integration
platforms found in namespace " + ns)
+ failTest(fmt.Errorf("multiple primary
integration platforms found in namespace " + ns))
Review Comment:
should we do like this instead since it's `Errorf`?
```
fmt.Errorf("multiple primary integration platforms found in namespace %q",
ns)
```
##########
e2e/support/test_support.go:
##########
@@ -1151,12 +1234,12 @@ func Platform(ns string) func() *v1.IntegrationPlatform
{
continue
}
if pl != nil {
- panic("multiple primary integration
platforms found in namespace " + ns)
+ failTest(fmt.Errorf("multiple primary
integration platforms found in namespace " + ns))
}
pl = &p
}
if pl == nil {
- panic(fmt.Sprintf("multiple integration
platforms found in namespace %q but no one is primary", ns))
+ failTest(fmt.Errorf(fmt.Sprintf("multiple
integration platforms found in namespace %q but no one is primary", ns)))
Review Comment:
Same here. You don't need `fmt.Springf`.
```
fmt.Errorf("multiple integration platforms found in namespace %q but no one
is primary", ns)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]