diff --git a/internal/config/config_test.go b/internal/config/config_test.go index d977312..1730669 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -260,7 +260,7 @@ func TestCarrierBatchMustFitDesktopLoopbackCap(t *testing.T) { } write := func(batch, body int) string { path := filepath.Join(directory, "config.json") - content := `{"public_hostname":"proxy.example.com","public_dir":"` + directory + `","profiles_file":"` + profiles + `","limits":{"carrier_batch_bytes":` + strconv.Itoa(batch) + `,"max_body_bytes":` + strconv.Itoa(body) + `}}` + content := `{"public_hostname":"proxy.example.com","public_dir":` + strconv.Quote(directory) + `,"profiles_file":` + strconv.Quote(profiles) + `,"limits":{"carrier_batch_bytes":` + strconv.Itoa(batch) + `,"max_body_bytes":` + strconv.Itoa(body) + `}}` if err := os.WriteFile(path, []byte(content), 0600); err != nil { t.Fatal(err) }