From fe9cdb7017f7718a136243c81ec5b2c6ef70fb9c Mon Sep 17 00:00:00 2001 From: Roberto Dip Date: Tue, 23 Aug 2022 09:58:10 -0300 Subject: [PATCH] fix flaky TestIntegrationsSandbox/TestInstallerHeadCheck (#7345) this adjusts the TestInstallerHeadCheck check to use `DoRaw` instead of `Do`, which sends a body with null when nil is passed for the params parameter. --- server/service/integration_sandbox_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/service/integration_sandbox_test.go b/server/service/integration_sandbox_test.go index 02f7448eb9..831c094254 100644 --- a/server/service/integration_sandbox_test.go +++ b/server/service/integration_sandbox_test.go @@ -102,21 +102,21 @@ func (s *integrationSandboxTestSuite) TestInstallerGet() { func (s *integrationSandboxTestSuite) TestInstallerHeadCheck() { validURL := installerURL(enrollSecret, "pkg", false) - s.Do("HEAD", validURL, nil, http.StatusOK) + s.DoRaw("HEAD", validURL, nil, http.StatusOK) // unauthorized requests s.DoRawNoAuth("HEAD", validURL, nil, http.StatusUnauthorized) s.token = "invalid" - s.Do("HEAD", validURL, nil, http.StatusUnauthorized) + s.DoRaw("HEAD", validURL, nil, http.StatusUnauthorized) s.token = s.cachedAdminToken // wrong enroll secret invalidURL := installerURL("wrong-enroll", "pkg", false) - s.Do("HEAD", invalidURL, nil, http.StatusInternalServerError) + s.DoRaw("HEAD", invalidURL, nil, http.StatusInternalServerError) // non-existent package invalidURL = installerURL(enrollSecret, "exe", false) - s.Do("HEAD", invalidURL, nil, http.StatusNotFound) + s.DoRaw("HEAD", invalidURL, nil, http.StatusNotFound) } func installerURL(secret, kind string, desktop bool) string {