#!/usr/bin/env bash # Test script for toolbox-qadocker set -e # Colors for output RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' NC='\033[0m' # No Color # Print colored output print_status() { echo -e "${GREEN}[INFO]${NC} $1" } print_warning() { echo -e "${YELLOW}[WARNING]${NC} $1" } print_error() { echo -e "${RED}[ERROR]${NC} $1" } print_status "Testing all installed QA tools in toolbox-QADocker:" print_status "1. Testing Hadolint (Dockerfile linter)..." echo "FROM ubuntu:24.04 RUN apt-get update RUN apt-get install -y curl" > /tmp/test.Dockerfile hadolint /tmp/test.Dockerfile || echo "Hadolint found issues (expected in test file)" print_status "2. Testing ShellCheck (shell script linter)..." echo '#!/bin/bash var=hello echo $var' > /tmp/test.sh chmod +x /tmp/test.sh shellcheck /tmp/test.sh || echo "ShellCheck found issues (expected in test file)" print_status "3. Testing Trivy (vulnerability scanner)..." trivy --version print_status "4. Testing Dockle (container linter)..." dockle --version print_status "5. Testing Docker client..." docker --version print_status "6. Testing Node.js..." node --version print_status "All tools are properly installed and functional!"