Skip to content

Commit

Permalink
show warden logs in case of failure
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiatekus committed Jan 9, 2024
1 parent daa5fce commit bb853cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/warden-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ jobs:
echo $IMG_VERSION
- name: run test
run: make verify-on-cluster
- name: Show Warden Logs
if: failure()
run: kubectl logs -l app=warden --prefix=true;
8 changes: 5 additions & 3 deletions tests/namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ package tests
import (
"context"
"fmt"
"testing"
"time"

"github.com/kyma-project/warden/pkg"
"github.com/stretchr/testify/require"
corev1 "k8s.io/api/core/v1"
Expand All @@ -14,8 +17,6 @@ import (
"k8s.io/client-go/dynamic"
ctrl "sigs.k8s.io/controller-runtime"
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
"testing"
"time"
"warden.kyma-project.io/tests/helpers"
)

Expand All @@ -38,7 +39,8 @@ func TestNamespaceWithLabel_AfterPodCreation(t *testing.T) {
require.NoError(t, k8sClient.Create(ctx, untrustedPod))

//WHEN
ns = tc.Namespace().WithValidation(true).Build()
// ns = tc.Namespace().WithName(ns.ObjectMeta.Name).WithValidation(true).Build()
ns = tc.Namespace().WithName("asd").WithValidation(true).Build()
require.NoError(t, k8sClient.Update(ctx, ns))

//THEN
Expand Down

0 comments on commit bb853cb

Please sign in to comment.