Skip to content

Commit 9afa248

Browse files
committed
Show the debug roundtripper logs in tests
Signed-off-by: Richard Wall <[email protected]>
1 parent 699a653 commit 9afa248

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/internal/cyberark/dataupload/dataupload_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ func TestCyberArkClient_PostDataReadingsWithOptions(t *testing.T) {
106106

107107
for _, tc := range tests {
108108
t.Run(tc.name, func(t *testing.T) {
109+
logger := ktesting.NewLogger(t, ktesting.DefaultConfig)
110+
ctx := klog.NewContext(t.Context(), logger)
111+
109112
server := dataupload.MockDataUploadServer()
110113
defer server.Close()
111114

@@ -118,7 +121,7 @@ func TestCyberArkClient_PostDataReadingsWithOptions(t *testing.T) {
118121
cyberArkClient, err := dataupload.NewCyberArkClient(certPool, server.Server.URL, tc.authenticate)
119122
require.NoError(t, err)
120123

121-
err = cyberArkClient.PostDataReadingsWithOptions(t.Context(), tc.payload, tc.opts)
124+
err = cyberArkClient.PostDataReadingsWithOptions(ctx, tc.payload, tc.opts)
122125
tc.requireFn(t, err)
123126
})
124127
}

0 commit comments

Comments
 (0)