refactor: simplify 99-final-verification.sh to focus on tutorial checks only
This commit is contained in:
@@ -21,7 +21,7 @@ echo ""
|
||||
all_passed=true
|
||||
|
||||
# Test 1: User and group configuration
|
||||
echo -e "${BLUE}[1/5] Checking user and group configuration...${NC}"
|
||||
echo -e "${BLUE}[1/3] Checking user and group configuration...${NC}"
|
||||
if id lab01_student &>/dev/null; then
|
||||
echo -e " ${GREEN}✓${NC} User lab01_student exists"
|
||||
if groups lab01_student 2>/dev/null | grep -q docker; then
|
||||
@@ -37,7 +37,7 @@ fi
|
||||
echo ""
|
||||
|
||||
# Test 2: Docker access control
|
||||
echo -e "${BLUE}[2/5] Checking Docker access control...${NC}"
|
||||
echo -e "${BLUE}[2/3] Checking Docker access control...${NC}"
|
||||
if sudo -u lab01_student docker ps &>/dev/null; then
|
||||
echo -e " ${GREEN}✓${NC} lab01_student can access Docker socket"
|
||||
else
|
||||
@@ -48,7 +48,7 @@ fi
|
||||
echo ""
|
||||
|
||||
# Test 3: Non-root container execution (INF-01)
|
||||
echo -e "${BLUE}[3/5] Checking non-root container execution (INF-01)...${NC}"
|
||||
echo -e "${BLUE}[3/3] Checking non-root container execution (INF-01)...${NC}"
|
||||
compose_file="labs/lab-01-iam/docker-compose.yml"
|
||||
if [ ! -f "$compose_file" ]; then
|
||||
echo -e " ${YELLOW}○${NC} docker-compose.yml not found"
|
||||
@@ -90,52 +90,6 @@ else
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 4: Documentation completeness (Diátaxis)
|
||||
echo -e "${BLUE}[4/5] Checking documentation (Diátaxis framework)...${NC}"
|
||||
doc_count=0
|
||||
for doc_type in "tutorial" "how-to-guides" "reference" "explanation"; do
|
||||
if [ -d "labs/lab-01-iam/$doc_type" ]; then
|
||||
local md_files=$(find "labs/lab-01-iam/$doc_type" -name "*.md" 2>/dev/null | wc -l)
|
||||
if [ "$md_files" -gt 0 ]; then
|
||||
echo -e " ${GREEN}✓${NC} $doc_type: $md_files document(s)"
|
||||
((doc_count++)) || true
|
||||
else
|
||||
echo -e " ${YELLOW}○${NC} $doc_type: directory exists but empty"
|
||||
fi
|
||||
else
|
||||
echo -e " ${RED}✗${NC} $doc_type: missing"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $doc_count -eq 4 ]; then
|
||||
echo -e " ${GREEN}✓${NC} All 4 Diátaxis document types present"
|
||||
else
|
||||
echo -e " ${YELLOW}○${NC} $doc_count/4 Diátaxis document types present"
|
||||
all_passed=false
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Test 5: IAM parallels documentation
|
||||
echo -e "${BLUE}[5/5] Checking IAM parallels explanation...${NC}"
|
||||
explanation_file="labs/lab-01-iam/explanation/docker-iam-parallels.md"
|
||||
if [ -f "$explanation_file" ]; then
|
||||
if grep -qi "IAM.*Linux\|Linux.*IAM" "$explanation_file"; then
|
||||
echo -e " ${GREEN}✓${NC} IAM parallels documented"
|
||||
else
|
||||
echo -e " ${YELLOW}○${NC} Explanation exists but IAM parallels unclear"
|
||||
fi
|
||||
|
||||
if grep -qi "differenza\|difference" "$explanation_file"; then
|
||||
echo -e " ${GREEN}✓${NC} Local vs cloud differences documented"
|
||||
else
|
||||
echo -e " ${YELLOW}○${NC} Local vs cloud differences not clearly documented"
|
||||
fi
|
||||
else
|
||||
echo -e " ${RED}✗${NC} IAM parallels explanation not found"
|
||||
all_passed=false
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Final summary
|
||||
echo -e "${BLUE}========================================${NC}"
|
||||
if [ "$all_passed" = true ]; then
|
||||
|
||||
Reference in New Issue
Block a user