test: rpm serve errors, terraform rewriteDownloadURL, pypi merger, s3 stat, pattern-validation 400

This commit is contained in:
2026-07-03 13:51:17 +10:00
parent 3e590bea2b
commit 1d97628fbd
4 changed files with 49 additions and 0 deletions
+4
View File
@@ -351,6 +351,10 @@ func TestServerValidationErrors(t *testing.T) {
if resp, _ := req(t, "POST", "/api/v2/remotes", `not json`); resp.StatusCode != 400 {
t.Errorf("invalid json: %d", resp.StatusCode)
}
// Invalid regex pattern -> 400 from ValidatePatterns.
if resp, _ := req(t, "POST", "/api/v2/remotes", `{"name":"badre","package_type":"generic","repo_type":"remote","base_url":"https://x","blocklist":["[unterminated"]}`); resp.StatusCode != 400 {
t.Errorf("invalid regex: %d", resp.StatusCode)
}
}
func TestServerDockerAndHead(t *testing.T) {