fix back-end test for UI OTA template (#21975)

See https://github.com/fleetdm/fleet/actions/runs/10804752744 for the
failure. I changed a UI template in
https://github.com/fleetdm/fleet/pull/21957 yesterday that didn't
trigger the Go tests.

In this PR I'm just fixing the test failure, I will adjust the worker to
trigger a test run when this file is modified in a separate PR to not
block this on codeowners.

# Checklist for submitter

- [x] Added/updated tests
This commit is contained in:
Roberto Dip 2024-09-11 10:16:37 -03:00 committed by GitHub
parent bc5c92df83
commit 298e34ffdb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,6 +64,5 @@ func TestServeEndUserEnrollOTA(t *testing.T) {
bodyBytes, err := io.ReadAll(response.Body)
require.NoError(t, err)
bodyString := string(bodyBytes)
require.Contains(t, bodyString, "Enroll your device to Fleet")
require.Contains(t, bodyString, "?enroll_secret=foo")
require.Contains(t, bodyString, "api/v1/fleet/enrollment_profiles/ota?enroll_secret=foo")
}