mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
fix: correct issue where resource setting was overriding pre-existing values
This commit is contained in:
@@ -121,10 +121,11 @@ func setResourceType(appName string, processType string, r Resource, resourceTyp
|
||||
common.LogInfo2Quiet(message)
|
||||
|
||||
for key, value := range resources {
|
||||
if value != "" {
|
||||
common.LogVerbose(fmt.Sprintf("%v: %v", key, value))
|
||||
if value == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
common.LogVerbose(fmt.Sprintf("%v: %v", key, value))
|
||||
property := propertyKey(processType, resourceType, key)
|
||||
err := common.PropertyWrite("resource", appName, property, value)
|
||||
if err != nil {
|
||||
|
||||
@@ -116,6 +116,11 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku resource:reserve --cpu 1.5 --process-type worker $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
dokku ps:rebuild "$TEST_APP"
|
||||
CID=$(< $DOKKU_ROOT/$TEST_APP/CONTAINER.web.1)
|
||||
run /bin/bash -c "docker inspect --format '{{.HostConfig.MemoryReservation}}' $CID"
|
||||
|
||||
Reference in New Issue
Block a user