From 34b78c52f2327b2be14187d3a336bf905547db28 Mon Sep 17 00:00:00 2001 From: Gaurav Saini <147703805+gauravsaini04@users.noreply.github.com> Date: Thu, 19 Dec 2024 05:19:00 +0000 Subject: [PATCH] [aws-cli] - issue #1224 - installing less for paginated output and avoiding errors --- src/aws-cli/install.sh | 2 +- test/aws-cli/less_installed.sh | 13 +++++++++++++ test/aws-cli/scenarios.json | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 test/aws-cli/less_installed.sh create mode 100644 test/aws-cli/scenarios.json diff --git a/src/aws-cli/install.sh b/src/aws-cli/install.sh index e7c03f728..feb806de5 100755 --- a/src/aws-cli/install.sh +++ b/src/aws-cli/install.sh @@ -68,7 +68,7 @@ check_packages() { export DEBIAN_FRONTEND=noninteractive -check_packages curl ca-certificates gnupg2 dirmngr unzip bash-completion +check_packages curl ca-certificates gnupg2 dirmngr unzip bash-completion less verify_aws_cli_gpg_signature() { local filePath=$1 diff --git a/test/aws-cli/less_installed.sh b/test/aws-cli/less_installed.sh new file mode 100644 index 000000000..a700a7a18 --- /dev/null +++ b/test/aws-cli/less_installed.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +# Import test library for `check` command +source dev-container-features-test-lib + +check "less is installed, pagination works !" less --version +check "less binary installation path" which less +check "Testing paginated output with less" ls -R / | less + +# Report result +reportResults \ No newline at end of file diff --git a/test/aws-cli/scenarios.json b/test/aws-cli/scenarios.json new file mode 100644 index 000000000..9dd703c27 --- /dev/null +++ b/test/aws-cli/scenarios.json @@ -0,0 +1,8 @@ +{ + "less_installed": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "aws-cli": {} + } + } +} \ No newline at end of file