mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-01 00:46:38 +00:00
Revert "k8s:kbs: Add trap statement to clean up tmp files"
This reverts commit 973b8a1d8f
.
As @danmihai1 points out https://github.com/bats-core/bats-core/issues/364
states that using traps in bats is error prone, so this could be the cause
of the confidential test instability we've been seeing, like it was
in the static checks, so let's try and revert this.
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
@@ -85,13 +85,12 @@ kbs_set_resource_base64() {
|
||||
fi
|
||||
|
||||
file=$(mktemp -t kbs-resource-XXXXX)
|
||||
trap "rm -f $file" EXIT
|
||||
|
||||
echo "$data" | base64 -d > "$file"
|
||||
|
||||
kbs_set_resource_from_file "$repository" "$type" "$tag" "$file" || \
|
||||
rc=$?
|
||||
|
||||
rm -f "$file"
|
||||
return $rc
|
||||
}
|
||||
|
||||
@@ -117,12 +116,12 @@ kbs_set_resource() {
|
||||
fi
|
||||
|
||||
file=$(mktemp -t kbs-resource-XXXXX)
|
||||
trap "rm -f $file" EXIT
|
||||
echo "$data" > "$file"
|
||||
|
||||
kbs_set_resource_from_file "$repository" "$type" "$tag" "$file" || \
|
||||
rc=$?
|
||||
|
||||
rm -f "$file"
|
||||
return $rc
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user