tests/e2e: brownfield, the update step restarts nothing in use (tests #113)

Aperta
#142 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
53/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
bash, debian, docker, ubuntu
Ambito
devops, testing

Direzione di ricerca

Start with tests/e2e/scenarios-brownfield.sh and the setup-brownfield fixture, then read the scenarios from #141 and #124 plus the update behavior introduced by #113. Add the update-existing scenario with the older docker-ce fixture and checks for package origins, holds, restart state, interactive defaults, and the fresh path. Run the end-to-end scenario on Debian 13 and Ubuntu 24.04; it is done when every listed check passes and the control confirms docker-ce is upgradable before the run.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: ci area: prep claude enhancement priority: medium size: M

Epic #121 · Tests #113 (epic #109) · Milestone Phase 5: Servers already in use · Priority medium · Size M · Depends on #113, #141, #124


Why

#113 adds UPGRADE_MODE and keeps the update step from restarting Docker, databases and web servers on a server in use.

Scenarios go in tests/e2e/scenarios-brownfield.sh (profile added by #124) and reuse its fixture from setup-brownfield: nginx on 80/443 with a token page, a container -p 8080:80, a deploy user with a key, the 50-site.conf drop-in, UFW with its own rules, a custom fail2ban jail, ptrace_scope = 0, and a "panel" root login on 22 before the run. Extra fixture listed below is added by this issue only.

Extra fixture

  • The older docker-ce from the #141 test, and the container running.

Scenario update-existing

  • --existing --yes --only update (UPGRADE_MODE=security): exit 0; docker-ce keeps its version; apt-mark showhold is empty after the run (the hold was only for the run); a todo gives the command for the maintenance window; the container StartedAt and the nginx main pid are unchanged.
  • Every package upgraded in this run comes from a security origin (/var/log/apt/history.log checked against apt-cache policy).
  • needrestart only lists: services it would restart are in a todo, and none of them restarted (pids unchanged).
  • UPGRADE_MODE=none: the count from apt list --upgradable is the same before and after.
  • Interactive: the "all / security / none" question shows, and defaults to security with --existing.
  • Fresh path: --yes --only update without --existing upgrades docker-ce as today.
  • Control: before the run, apt list --upgradable really lists docker-ce. Otherwise the scenario fails as "fixture broken", not as passed.

Acceptance criteria

  • Passes on Debian 13 and Ubuntu 24.04.
Lingua principale
Shell
Stelle
2
Fork
3
Merge medio
2g 14m
PR unite (30g)
47

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di exceev-consulting/server-prep

Tutte le issue di exceev-consulting/server-prep

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.