File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ Assumes that "ignition.gateway.useMaxRAMPercentage" has already been checked.
195195 {{- end -}}
196196 {{- end -}}
197197
198- {{- printf " %v " $maxRAMPercentage }}
198+ {{- printf " %v " (int (min $maxRAMPercentage 100)) }}
199199{{- end }}
200200
201201{{/*
Original file line number Diff line number Diff line change @@ -213,6 +213,25 @@ tests:
213213 - contains :
214214 path : data["gateway.jvmArgs"]
215215 content : -XX:InitialRAMPercentage=60
216+ - it : check gateway.maxRAMPercentage over 100
217+ set :
218+ gateway.maxRAMPercentage : 150
219+ asserts :
220+ - contains :
221+ path : data["gateway.jvmArgs"]
222+ content : -XX:InitialRAMPercentage=100
223+ - it : check gateway.maxRAMPercentage negative value
224+ set :
225+ gateway.maxRAMPercentage : -1
226+ gateway.resourcesEnabled : false
227+ asserts :
228+ - equal :
229+ path : data["gateway.useMaxRAMPercentage"]
230+ value : false
231+ - notExists :
232+ path : data["gateway.jvmArgs"]
233+ - notExists :
234+ path : data["gateway.wrapperArgs"]
216235- it : check gateway.maxRAMPercentage of auto with resources disabled
217236 set :
218237 gateway.maxRAMPercentage : " auto"
You can’t perform that action at this time.
0 commit comments