From 298e34ffdbb2cdb8f553f9823ad254d7cf914e8d Mon Sep 17 00:00:00 2001 From: Roberto Dip Date: Wed, 11 Sep 2024 10:16:37 -0300 Subject: [PATCH] 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 --- server/service/frontend_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/service/frontend_test.go b/server/service/frontend_test.go index 2710b69e9d..22df31872a 100644 --- a/server/service/frontend_test.go +++ b/server/service/frontend_test.go @@ -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") }