essobedo commented on code in PR #3623:
URL: https://github.com/apache/camel-k/pull/3623#discussion_r966851215
##########
e2e/global/common/kamelet_test.go:
##########
@@ -41,18 +41,37 @@ func TestKameletClasspathLoading(t *testing.T) {
Eventually(Kamelet(kameletName, ns)).Should(BeNil())
- Expect(KamelRunWithID(operatorID, ns,
"files/TimerKameletIntegration.java", "-t", "kamelets.enabled=false",
- "--resource",
"file:files/timer-source.kamelet.yaml@/kamelets/timer-source.kamelet.yaml",
- "-p camel.component.kamelet.location=file:/kamelets",
- "-d", "camel:yaml-dsl",
- // kamelet dependencies
- "-d", "camel:timer").Execute()).To(Succeed())
- Eventually(IntegrationPodPhase(ns,
"timer-kamelet-integration"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
-
- Eventually(IntegrationLogs(ns,
"timer-kamelet-integration")).Should(ContainSubstring("important message"))
-
- // Cleanup
- Expect(Kamel("delete", "--all", "-n",
ns).Execute()).Should(BeNil())
+ // Basic
+ t.Run("test basic case", func(t *testing.T) {
+
+ Expect(KamelRunWithID(operatorID, ns,
"files/TimerKameletIntegration.java", "-t", "kamelets.enabled=false",
+ "--resource",
"file:files/timer-source.kamelet.yaml@/kamelets/timer-source.kamelet.yaml",
+ "-p
camel.component.kamelet.location=file:/kamelets",
+ "-d", "camel:yaml-dsl",
Review Comment:
I have checked and they are obviously both needed otherwise the integration
doesn't start.
Indeed, we get errors of type:
Without `camel:yaml-dsl`
```
Caused by: java.lang.IllegalArgumentException: Cannot find
RoutesBuilderLoader in classpath supporting file extension: kamelet.yaml
at
org.apache.camel.impl.engine.DefaultRoutesLoader.resolveRoutesBuilderLoader(DefaultRoutesLoader.java:201)
at
org.apache.camel.impl.engine.DefaultRoutesLoader.findRoutesBuilders(DefaultRoutesLoader.java:106)
at
org.apache.camel.spi.RoutesLoader.findRoutesBuilders(RoutesLoader.java:117)
at org.apache.camel.spi.RoutesLoader.loadRoutes(RoutesLoader.java:72)
at
org.apache.camel.support.RouteTemplateHelper.loadRouteTemplateFromLocation(RouteTemplateHelper.java:82)
at
org.apache.camel.component.kamelet.KameletComponent$LifecycleHandler.createRouteForEndpoint(KameletComponent.java:395)
at
org.apache.camel.component.kamelet.KameletComponent$LifecycleHandler.onContextInitialized(KameletComponent.java:419)
```
and
Without `camel:timer`
```
Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be
found for: timer://tick?period=1000, please check your classpath contains the
needed Camel component jar.
at
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:991)
at
org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:867)
at
org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:58)
at
org.apache.camel.reifier.AbstractReifier.resolveEndpoint(AbstractReifier.java:191)
at
org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:94)
at
org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:74)
```
--
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]