mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
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.
This commit is contained in:
parent
7e1e69c9bc
commit
fe9cdb7017
1 changed files with 4 additions and 4 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue