File tree 2 files changed +37
-1
lines changed
apisix/discovery/kubernetes
2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ local default_weight_schema = {
101
101
102
102
local shared_size_schema = {
103
103
type = " string" ,
104
- pattern = [[ ^[1-9][0-9]? m$]] ,
104
+ pattern = [[ ^[1-9][0-9]* m$]] ,
105
105
default = " 1m" ,
106
106
}
107
107
Original file line number Diff line number Diff line change @@ -385,3 +385,39 @@ qr/re-read the token value/
385
385
--- grep_error_log_out
386
386
re-read the token value
387
387
re-read the token value
388
+
389
+
390
+
391
+ === TEST 8: default value with minimal configuration and large shared_size
392
+ --- yaml_config
393
+ apisix:
394
+ node_listen: 1984
395
+ config_center: yaml
396
+ deployment:
397
+ role: data_plane
398
+ role_data_plane:
399
+ config_provider: yaml
400
+ discovery:
401
+ kubernetes:
402
+ client:
403
+ token: ${KUBERNETES_CLIENT_TOKEN}
404
+ shared_size: "1000m"
405
+ --- request
406
+ GET /compare
407
+ {
408
+ "service": {
409
+ "schema": "https",
410
+ "host": "${KUBERNETES_SERVICE_HOST}",
411
+ "port": "${KUBERNETES_SERVICE_PORT}"
412
+ },
413
+ "client": {
414
+ "token": "${KUBERNETES_CLIENT_TOKEN}"
415
+ },
416
+ "watch_endpoint_slices": false,
417
+ "shared_size": "1000m",
418
+ "default_weight": 50
419
+ }
420
+ --- more_headers
421
+ Content-type: application/json
422
+ --- response_body
423
+ true
You can’t perform that action at this time.
0 commit comments