You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "gansheer (via GitHub)" <gi...@apache.org> on 2023/08/09 13:20:43 UTC

[GitHub] [camel-k] gansheer opened a new pull request, #4659: chore(e2e): Test on kamelets configurations using configmaps

gansheer opened a new pull request, #4659:
URL: https://github.com/apache/camel-k/pull/4659

   ## Motivation
   
   Strengthen the tests on configuration via configmaps to define what type of configurations actually works.
   
   ## Description
   
   * Test of Integrations using kamelets and configmaps
   * Test of Pipes using kamelets and configmaps
   
   
   **Release Note**
   ```release-note
   chore(e2e): Test on kamelets configurations using configmaps
   ```
   


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez commented on a diff in pull request #4659: chore(e2e): Test on kamelets configurations using configmaps

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4659:
URL: https://github.com/apache/camel-k/pull/4659#discussion_r1289613408


##########
e2e/common/config/kamelet_config_test.go:
##########
@@ -89,6 +90,25 @@ func TestKameletImplicitConfig(t *testing.T) {
 			Expect(DeleteSecret(ns, secretName)).To(Succeed())
 		})
 
+		t.Run("run test default config using mounted configmap", func(t *testing.T) {
+			name := "my-own-timer-source-default-config-mounted-configmaps"
+			cmName := "my-mounted-default-secret"
+
+			var cmData = make(map[string]string)
+			cmData["camel.kamelet.my-own-timer-source.message"] = "very top mounted configmap message"
+			Expect(CreatePlainTextConfigmap(ns, cmName, cmData)).To(Succeed())
+
+			Expect(KamelRunWithID(operatorID, ns, "files/TimerKameletIntegrationConfiguration.java",
+				"-p", "camel.kamelet.my-own-timer-source.message='Default message'",

Review Comment:
   Why passing this property? it's the same you later provide in the configmap. Unless we want to explicitly test the precedence of the trait over the property, I don't see the reason to have it specified. Do I miss something?



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] gansheer commented on a diff in pull request #4659: chore(e2e): Test on kamelets configurations using configmaps

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #4659:
URL: https://github.com/apache/camel-k/pull/4659#discussion_r1289810773


##########
e2e/common/config/kamelet_config_test.go:
##########
@@ -89,6 +90,25 @@ func TestKameletImplicitConfig(t *testing.T) {
 			Expect(DeleteSecret(ns, secretName)).To(Succeed())
 		})
 
+		t.Run("run test default config using mounted configmap", func(t *testing.T) {
+			name := "my-own-timer-source-default-config-mounted-configmaps"
+			cmName := "my-mounted-default-secret"
+
+			var cmData = make(map[string]string)
+			cmData["camel.kamelet.my-own-timer-source.message"] = "very top mounted configmap message"
+			Expect(CreatePlainTextConfigmap(ns, cmName, cmData)).To(Succeed())
+
+			Expect(KamelRunWithID(operatorID, ns, "files/TimerKameletIntegrationConfiguration.java",
+				"-p", "camel.kamelet.my-own-timer-source.message='Default message'",

Review Comment:
   It is probably an error. Adding some precedence test is still a good idea so I could add some, WDYT ?



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez merged pull request #4659: chore(e2e): Test on kamelets configurations using configmaps

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez merged PR #4659:
URL: https://github.com/apache/camel-k/pull/4659


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] gansheer commented on pull request #4659: chore(e2e): Test on kamelets configurations using configmaps

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on PR #4659:
URL: https://github.com/apache/camel-k/pull/4659#issuecomment-1671391527

   > So, IIUC, with this PR we aim to enforce the trait configuration order over plain properties when they both have the same?
   
   It is actually a follow up of this PR #4619 where I through the configmap oriented kamelets user configuration didn't work because of the error made in the test_support `DeleteConfigmap` function :confounded: .
   
   With this PR the tests now check in the end all the methods that works for user config : plain properties, secrets and configmaps.
   


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez commented on a diff in pull request #4659: chore(e2e): Test on kamelets configurations using configmaps

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4659:
URL: https://github.com/apache/camel-k/pull/4659#discussion_r1289822775


##########
e2e/common/config/kamelet_config_test.go:
##########
@@ -89,6 +90,25 @@ func TestKameletImplicitConfig(t *testing.T) {
 			Expect(DeleteSecret(ns, secretName)).To(Succeed())
 		})
 
+		t.Run("run test default config using mounted configmap", func(t *testing.T) {
+			name := "my-own-timer-source-default-config-mounted-configmaps"
+			cmName := "my-mounted-default-secret"
+
+			var cmData = make(map[string]string)
+			cmData["camel.kamelet.my-own-timer-source.message"] = "very top mounted configmap message"
+			Expect(CreatePlainTextConfigmap(ns, cmName, cmData)).To(Succeed())
+
+			Expect(KamelRunWithID(operatorID, ns, "files/TimerKameletIntegrationConfiguration.java",
+				"-p", "camel.kamelet.my-own-timer-source.message='Default message'",

Review Comment:
   Okey, that was my confusion. No I think that for the sake of this PR we should remove any ambiguity. I'd say we already cover the precedence check in some other test.



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org