You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2021/05/17 09:57:05 UTC
[camel-k] 04/05: chore(e2e): support configmap and secret creation
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 4759a4bf490de6a3229c01e8816fc002efb46d7e
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Fri May 14 15:40:54 2021 +0200
chore(e2e): support configmap and secret creation
---
e2e/support/test_support.go | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index ad57ef6..01732cf 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -661,6 +661,36 @@ func Configmap(ns string, name string) func() *corev1.ConfigMap {
}
}
+func NewPlainTextConfigmap(ns string, name string, data map[string]string) error {
+ cm := corev1.ConfigMap{
+ TypeMeta: metav1.TypeMeta{
+ Kind: "ConfigMap",
+ APIVersion: corev1.SchemeGroupVersion.String(),
+ },
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: ns,
+ Name: name,
+ },
+ Data: data,
+ }
+ return TestClient().Create(TestContext, &cm)
+}
+
+func NewPlainTextSecret(ns string, name string, data map[string]string) error {
+ sec := corev1.Secret{
+ TypeMeta: metav1.TypeMeta{
+ Kind: "Secret",
+ APIVersion: corev1.SchemeGroupVersion.String(),
+ },
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: ns,
+ Name: name,
+ },
+ StringData: data,
+ }
+ return TestClient().Create(TestContext, &sec)
+}
+
func KnativeService(ns string, name string) func() *servingv1.Service {
return func() *servingv1.Service {
answer := servingv1.Service{