test: rpm serve errors, terraform rewriteDownloadURL, pypi merger, s3 stat, pattern-validation 400
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user