tests/int/helpers: rm old code
This was added by commit together with set_resources_limit,
and was needed for the latter, since sed was used to update resources.
Now when we switched to jq in commit this kludge is no
longer needed.
@@ -68,11 +68,6 @@ function runc_spec() {
if [[ "$ROOTLESS" -ne 0 ]] && [[ "$ROOTLESS_FEATURES" == *"idmap"* ]]; then
runc_rootless_idmap "$bundle"
fi
-
- # Ensure config.json contains linux.resources
- if [[ "$ROOTLESS" -ne 0 ]] && [[ "$ROOTLESS_FEATURES" == *"cgroup"* ]]; then
- runc_rootless_cgroup "$bundle"
- fi
}
# Helper function to reformat config.json file. Input uses jq syntax.
@@ -92,12 +87,6 @@ function runc_rootless_idmap() {
| .linux.gidMappings += [{"hostID": '"$(($ROOTLESS_GIDMAP_START + 100))"', "containerID": 1000, "size": '"$(($ROOTLESS_GIDMAP_LENGTH - 1000))"'}]' $bundle
}
-# Shortcut to add empty resources as part of a rootless configuration.
-function runc_rootless_cgroup() {
- bundle="${1:-.}"
- update_config '.linux.resources += {"memory":{},"cpu":{},"blockio":{},"pids":{}}' $bundle
-}
-
# Returns systemd version as a number (-1 if systemd is not enabled/supported).
function systemd_version() {
if [ -n "${RUNC_USE_SYSTEMD}" ]; then
