Fix unknown function ends_with in pg
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -541,12 +541,12 @@ func reportDetectedCookies(t *testing.T, c *testutil.Client, bannerID string, na
|
||||
body, err := json.Marshal(map[string]any{"cookies": cookies})
|
||||
require.NoError(t, err)
|
||||
|
||||
endpoint := fmt.Sprintf("%s/api/cookie-banner/v1/%s/detected-cookies", c.BaseURL(), bannerID)
|
||||
endpoint := fmt.Sprintf("%s/api/cookie-banner/v1/%s/report", c.BaseURL(), bannerID)
|
||||
resp, err := c.HTTPClient().Post(endpoint, "application/json", bytes.NewReader(body))
|
||||
require.NoError(t, err)
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
require.Equal(t, http.StatusNoContent, resp.StatusCode,
|
||||
"detected-cookies endpoint should return 204")
|
||||
"report endpoint should return 204")
|
||||
}
|
||||
|
||||
func TestCookieBannerVersioning_DetectedCookiesNeverBump(t *testing.T) {
|
||||
|
||||
@@ -241,7 +241,7 @@ WHERE
|
||||
AND (
|
||||
(match_type = @match_type_glob
|
||||
AND starts_with(@identifier, split_part(pattern, '*', 1))
|
||||
AND ends_with(@identifier, split_part(pattern, '*', 2))
|
||||
AND right(@identifier, length(split_part(pattern, '*', 2))) = split_part(pattern, '*', 2)
|
||||
AND length(@identifier) >= length(pattern) - 1)
|
||||
OR (match_type = @match_type_exact AND pattern = @identifier)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user