Skip to content

Commit

Permalink
PBM-1114 simulate failure on uploading metadata files
Browse files Browse the repository at this point in the history
  • Loading branch information
olexandr-havryliak committed Sep 19, 2024
1 parent b334dd9 commit 16874b4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 105 deletions.
1 change: 1 addition & 0 deletions pbm-functional/pytest/Dockerfile-nginx
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
FROM nginx:stable-alpine
COPY conf/nginx.conf /etc/nginx/nginx.conf
EXPOSE 21114
26 changes: 17 additions & 9 deletions pbm-functional/pytest/conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ http {
sendfile on;
keepalive_timeout 65;
limit_req_zone $limit zone=one:10m rate=10r/m;
limit_conn_zone $binary_remote_addr zone=addr:10m;

map $request_method $limit {
default "";
Expand All @@ -32,8 +31,7 @@ http {
}

server {
listen 80;
listen [::]:80;
listen 21114;
server_name minio-nginx;

ignore_invalid_headers off;
Expand All @@ -52,13 +50,23 @@ http {
proxy_set_header Connection "";
chunked_transfer_encoding off;

limit_req zone=one;
limit_req_status 429;

limit_conn addr 10;
limit_conn_status 444;

proxy_pass http://minio:9000/;
}
location ~* metadata\.json {
if ($request_method = PUT) {
return 444;
}
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

proxy_connect_timeout 300;
proxy_http_version 1.1;
proxy_set_header Connection "";
chunked_transfer_encoding off;

proxy_pass http://minio:9000$request_uri;
}
}
}
96 changes: 0 additions & 96 deletions pbm-functional/pytest/test_trottling.py

This file was deleted.

0 comments on commit 16874b4

Please sign in to comment.