diff --git a/src/test/common.go b/src/test/common.go index c741aee02a..62aff83083 100644 --- a/src/test/common.go +++ b/src/test/common.go @@ -126,7 +126,7 @@ func (e2e *ZarfE2ETest) GetMismatchedArch() string { func (e2e *ZarfE2ETest) GetLogger(t *testing.T) *slog.Logger { t.Helper() cfg := logger.Config{ - Level: logger.Debug, + Level: logger.Info, Format: logger.FormatConsole, Destination: logger.DestinationDefault, // Stderr Color: false, diff --git a/src/test/e2e/14_oci_compose_test.go b/src/test/e2e/14_oci_compose_test.go index 0bbf33eeba..b1002aabcc 100644 --- a/src/test/e2e/14_oci_compose_test.go +++ b/src/test/e2e/14_oci_compose_test.go @@ -19,6 +19,7 @@ import ( "github.com/stretchr/testify/suite" "github.com/zarf-dev/zarf/src/api/v1alpha1" "github.com/zarf-dev/zarf/src/pkg/layout" + "github.com/zarf-dev/zarf/src/pkg/logger" "github.com/zarf-dev/zarf/src/pkg/transform" "github.com/zarf-dev/zarf/src/pkg/utils" "github.com/zarf-dev/zarf/src/pkg/zoci" @@ -187,6 +188,7 @@ func (suite *PublishCopySkeletonSuite) Test_3_Copy() { dstRegistry := testutil.SetupInMemoryRegistry(testutil.TestContext(t), t, 31890) dstRef := strings.Replace(ref, suite.Reference.Registry, dstRegistry, 1) ctx := testutil.TestContext(t) + ctx = logger.WithContext(ctx, e2e.GetLogger(t)) src, err := zoci.NewRemote(ctx, ref, oci.PlatformForArch(e2e.Arch), oci.WithPlainHTTP(true)) suite.NoError(err) diff --git a/src/test/e2e/21_connect_creds_test.go b/src/test/e2e/21_connect_creds_test.go index c994133557..d6486046a3 100644 --- a/src/test/e2e/21_connect_creds_test.go +++ b/src/test/e2e/21_connect_creds_test.go @@ -24,8 +24,7 @@ type RegistryResponse struct { func TestConnectAndCreds(t *testing.T) { t.Log("E2E: Connect") - ctx := context.Background() - ctx = logger.WithContext(ctx, e2e.GetLogger(t)) + ctx := logger.WithContext(context.Background(), e2e.GetLogger(t)) prevAgentSecretData, _, err := e2e.Kubectl(t, "get", "secret", "agent-hook-tls", "-n", "zarf", "-o", "jsonpath={.data}") require.NoError(t, err) diff --git a/src/test/e2e/22_git_and_gitops_test.go b/src/test/e2e/22_git_and_gitops_test.go index ad20629cf9..e46e63d7dc 100644 --- a/src/test/e2e/22_git_and_gitops_test.go +++ b/src/test/e2e/22_git_and_gitops_test.go @@ -16,6 +16,7 @@ import ( "github.com/stretchr/testify/require" "github.com/zarf-dev/zarf/src/internal/gitea" "github.com/zarf-dev/zarf/src/pkg/cluster" + "github.com/zarf-dev/zarf/src/pkg/logger" "github.com/zarf-dev/zarf/src/types" ) @@ -35,7 +36,8 @@ func TestGit(t *testing.T) { c, err := cluster.NewCluster() require.NoError(t, err) - ctx := context.Background() + ctx := logger.WithContext(context.Background(), e2e.GetLogger(t)) + tunnelGit, err := c.Connect(ctx, cluster.ZarfGit) require.NoError(t, err) defer tunnelGit.Close() @@ -132,7 +134,7 @@ func testGitServerTagAndHash(ctx context.Context, t *testing.T, gitURL string) { } func waitFluxPodInfoDeployment(t *testing.T) { - ctx := context.Background() + ctx := logger.WithContext(context.Background(), e2e.GetLogger(t)) cluster, err := cluster.NewClusterWithWait(ctx) require.NoError(t, err) zarfState, err := cluster.LoadZarfState(ctx) diff --git a/src/test/e2e/23_data_injection_test.go b/src/test/e2e/23_data_injection_test.go index 6c1655c711..ecb65d4c69 100644 --- a/src/test/e2e/23_data_injection_test.go +++ b/src/test/e2e/23_data_injection_test.go @@ -19,9 +19,7 @@ import ( func TestDataInjection(t *testing.T) { t.Log("E2E: Data injection") - ctx := context.Background() - ctx = logger.WithContext(ctx, e2e.GetLogger(t)) - + ctx := logger.WithContext(context.Background(), e2e.GetLogger(t)) path := fmt.Sprintf("build/zarf-package-kiwix-%s-3.5.0.tar", e2e.Arch) tmpdir := t.TempDir()