From d1ba52f3c3bdc31c2067f986fdb57088d875c01e Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sat, 28 Sep 2024 13:15:53 -0700 Subject: tests: Address deprecation warnings and errors --- hugolib/securitypolicies_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'hugolib/securitypolicies_test.go') diff --git a/hugolib/securitypolicies_test.go b/hugolib/securitypolicies_test.go index 3ddda7d6a..facda80eb 100644 --- a/hugolib/securitypolicies_test.go +++ b/hugolib/securitypolicies_test.go @@ -123,7 +123,7 @@ func TestSecurityPolicies(t *testing.T) { c.Skip() } cb := func(b *sitesBuilder) { - b.WithTemplatesAdded("index.html", `{{ $scss := "body { color: #333; }" | resources.FromString "foo.scss" | resources.ToCSS (dict "transpiler" "dartsass") }}`) + b.WithTemplatesAdded("index.html", `{{ $scss := "body { color: #333; }" | resources.FromString "foo.scss" | css.Sass (dict "transpiler" "dartsass") }}`) } testVariant(c, cb, "") }) @@ -137,10 +137,10 @@ func TestSecurityPolicies(t *testing.T) { b.WithConfigFile("toml", ` [security] [security.exec] -allow="none" - +allow="none" + `) - b.WithTemplatesAdded("index.html", `{{ $scss := "body { color: #333; }" | resources.FromString "foo.scss" | resources.ToCSS (dict "transpiler" "dartsass") }}`) + b.WithTemplatesAdded("index.html", `{{ $scss := "body { color: #333; }" | resources.FromString "foo.scss" | css.Sass (dict "transpiler" "dartsass") }}`) } testVariant(c, cb, `(?s).*sass(-embedded)?" is not whitelisted in policy "security\.exec\.allow".*`) }) @@ -160,7 +160,7 @@ allow="none" httpTestVariant(c, `{{ $json := resources.GetRemote "%[1]s/fruits.json" }}{{ $json.Content }}`, `(?s).*is not whitelisted in policy "security\.http\.urls".*`, func(b *sitesBuilder) { b.WithConfigFile("toml", ` -[security] +[security] [security.http] urls="none" `) @@ -181,7 +181,7 @@ urls="none" httpTestVariant(c, `{{ $json := resources.GetRemote "%[1]s/fakejson.json" }}{{ $json.Content }}`, ``, func(b *sitesBuilder) { b.WithConfigFile("toml", ` -[security] +[security] [security.http] mediaTypes=["application/json"] -- cgit v1.2.3