feat: rename functions and variables for clarity in safehttp package; enhance URL validation tests

This commit is contained in:
MengMengCode
2026-08-04 05:05:45 +08:00
parent a28ae727f3
commit 23a0541f7c
3 changed files with 97 additions and 33 deletions
+2 -2
View File
@@ -84,12 +84,12 @@ func TestCustomLXCImageCreateRejectsInvalidSource(t *testing.T) {
}
}
func TestCustomImageCreateRejectsPrivateNetworkSource(t *testing.T) {
func TestCustomImageCreateRejectsMetadataSource(t *testing.T) {
for _, imageType := range []string{"lxc", "kvm"} {
t.Run(imageType, func(t *testing.T) {
payload := map[string]string{
"type": imageType,
"name": "Private Network Source",
"name": "Metadata Source",
"distro": "ubuntu",
"release": "noble",
"arch": runtime.GOARCH,