- Home
- Skills
- Gentleman Programming
- Gentleman.Dots
- Gentleman E2e
gentleman-e2e_skill
- Shell
1.3k
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill gentleman-programming/gentleman.dots --skill gentleman-e2e- SKILL.md7.2 KB
Overview
This skill provides Docker-based end-to-end testing patterns for the Gentleman.Dots installer. It codifies test script structure, Dockerfile conventions, non-interactive install checks, cleanup routines, and a decision tree for adding tests or platform support. The goal is reliable, repeatable E2E verification inside disposable containers.
How this skill works
Tests are shell functions in e2e_test.sh that use simple logging helpers and increment pass/fail counters. Each platform has a Dockerfile that provisions a non-root test user, copies the installer binary and test script, and runs the suite. Tests run the installer with --non-interactive, verify generated config files, optionally exercise backup/restore, and clean state between tests.
When to use it
- Adding E2E tests for new installer features or flags
- Creating Dockerfiles for new platforms or distro variants
- Modifying the e2e_test.sh script or test patterns
- Debugging installation failures or configuration regressions
- Adding or validating backup/restore behavior
Best practices
- Keep each test in its own test_* function and use log_test/log_pass/log_fail
- Always run installer with --non-interactive in CI to avoid prompts
- Clean previous artifacts before each test (rm -rf $HOME/.config etc.)
- Use a non-root testuser with sudo in Dockerfiles to mirror real-use conditions
- Keep Dockerfiles minimal: install runtime deps, copy binary and test script
Example use cases
- Write test_zsh_zellij() to validate zsh + zellij installs and assert .zshrc contents
- Add Dockerfile.alpine to support Alpine CI by installing platform-specific deps
- Create tests that call gentleman-dots --backup=true and assert .gentleman-backup-* exists
- Run container interactively for debugging: docker run --rm -it image /bin/bash
- Run targeted matrix via docker-test.sh and env flags like RUN_FULL_E2E or RUN_BACKUP_TESTS
FAQ
Set RUN_BACKUP_TESTS=1 when running the container; the test script will pick that up and run backup-specific checks.
Why use a non-root test user in Dockerfiles?
Using a non-root user with sudo better mirrors real user environments and ensures file permission and install behaviors are realistic.