Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1939 from chavafg/topic/1.8-backport
Browse files Browse the repository at this point in the history
backport fixes to stable-1.8
  • Loading branch information
chavafg authored Aug 29, 2019
2 parents ee2e96a + b5aa2bb commit 56db531
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .ci/install_firecracker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ path="/usr/local/bin/kata-runtime"

if [ -f $docker_configuration_file ]; then
# Check devicemapper flag
check_devicemapper=$(grep -w '"storage-driver": "${driver}"' $docker_configuration_file | wc -l)
check_devicemapper=$(grep -w '"storage-driver": "'${driver}'"' $docker_configuration_file | wc -l)
[ $check_devicemapper -eq 0 ] && die "${driver} is not enabled at $docker_configuration_file"
# Check kata runtime flag
check_kata=$(grep -w '"path": "${path}"' $docker_configuration_file | wc -l)
check_kata=$(grep -w '"path": "'${path}'"' $docker_configuration_file | wc -l)
[ $check_kata -eq 0 ] && die "Kata Runtime path not found at $docker_configuration_file"
else
cat <<-EOF | sudo tee "$docker_configuration_file"
Expand Down
6 changes: 4 additions & 2 deletions .ci/static-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -892,15 +892,17 @@ main()

local long_option_names="${!long_options[@]}"

local args=$(getopt \
local args

args=$(getopt \
-n "$script_name" \
-a \
--options="h" \
--longoptions="$long_option_names" \
-- "$@")
[ $? -eq 0 ] || { usage >&2; exit 1; }

eval set -- "$args"
[ $? -ne 0 ] && { usage >&2; exit 1; }

local func=

Expand Down
2 changes: 1 addition & 1 deletion Unit-Test-Advice.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestJoinParamsWithDash(t *testing.T) {
// Call the function under test
result, err := joinParamsWithDash(d.param1, d.param2)

if expectError {
if d.expectError {
assert.Error(err, msg)

// If an error is expected, there is no point
Expand Down
2 changes: 1 addition & 1 deletion cmd/check-spelling/kata-spell-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ main()
{
setup

[ -z "$1" ] && die "need command"
[ -z "${1:-}" ] && die "need command"

case "$1" in
check) shift && spell_check_file "$1" ;;
Expand Down
6 changes: 3 additions & 3 deletions integration/containerd/cri/integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ ci_cleanup() {
fi
}

create_continerd_config() {
create_containerd_config() {
local runtime="$1"
[ -n "${runtime}" ] || die "need runtime to create config"

Expand Down Expand Up @@ -143,7 +143,7 @@ trap err_report ERR

check_daemon_setup() {
info "containerd(cri): Check daemon works with runc"
create_continerd_config "runc"
create_containerd_config "runc"

sudo -E PATH="${PATH}:/usr/local/bin" \
REPORT_DIR="${REPORT_DIR}" \
Expand All @@ -170,7 +170,7 @@ main() {

info "containerd(cri): testing using runtime: ${containerd_runtime_test}"

create_continerd_config "${containerd_runtime_test}"
create_containerd_config "${containerd_runtime_test}"

info "containerd(cri): Running cri-tools"
sudo -E PATH="${PATH}:/usr/local/bin" \
Expand Down

0 comments on commit 56db531

Please sign in to comment.