This is an automated email from the ASF dual-hosted git repository.

cdeppisch pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new 816822c13 Fix CamelCatalog create test
816822c13 is described below

commit 816822c134ec43c64c789c0a073775d60ecc0968
Author: Christoph Deppisch <cdeppi...@redhat.com>
AuthorDate: Tue Feb 20 08:57:25 2024 +0100

    Fix CamelCatalog create test
---
 pkg/controller/integrationplatform/create_test.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pkg/controller/integrationplatform/create_test.go 
b/pkg/controller/integrationplatform/create_test.go
index e51b83339..c5009d08c 100644
--- a/pkg/controller/integrationplatform/create_test.go
+++ b/pkg/controller/integrationplatform/create_test.go
@@ -59,21 +59,26 @@ func TestCreate(t *testing.T) {
        assert.Nil(t, err)
        assert.NotEmpty(t, list.Items)
 
-       items, err := resources.WithPrefix("/camel-catelog-")
+       items, err := resources.WithPrefix("/resources/camel-catalog-")
        assert.Nil(t, err)
 
+       foundOverall := 0
        for _, k := range items {
                found := false
 
                for _, c := range list.Items {
                        n := strings.TrimSuffix(k, ".yaml")
+                       n = strings.TrimPrefix(n, "resources/")
                        n = strings.ToLower(n)
 
                        if c.Name == n {
                                found = true
+                               foundOverall++
                        }
                }
 
                assert.True(t, found)
        }
+
+       assert.Equal(t, 1, foundOverall)
 }

Reply via email to