From d7fc23494732085df96eb174f5e19abfe9604c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edu=20G=C3=B3mez=20Escandell?= Date: Thu, 19 Oct 2023 16:02:02 +0200 Subject: [PATCH] Skip test in agent when running without mocks --- windows-agent/internal/proservices/landscape/landscape_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/windows-agent/internal/proservices/landscape/landscape_test.go b/windows-agent/internal/proservices/landscape/landscape_test.go index 4a4b95784..8bcc2a4d2 100644 --- a/windows-agent/internal/proservices/landscape/landscape_test.go +++ b/windows-agent/internal/proservices/landscape/landscape_test.go @@ -263,6 +263,8 @@ func TestSendUpdatedInfo(t *testing.T) { mock := wslmock.New() mock.StateError = tc.stateErr ctx = wsl.WithMock(ctx, mock) + } else if tc.stateErr { + t.Skip("This test is skipped because it necessitates the GoWSL mock") } lis, server, mockService := setUpLandscapeMock(t, ctx, "localhost:", false)