tests: test infrastructure (setup/teardown) improvements
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Refactoring
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- testing-qa
Rechercherichtung
Beginne damit, Modified_Testcase und die Diskussion zur Testinfrastruktur aus #1346 zu lesen, um die bestehenden Muster für Setup und Teardown zu erfassen. Vergleiche, wie Tests Repositories und temporäre Verzeichnisse erstellen, bereitstellen, verfügbar machen und entfernen. Als erledigt gilt die Aufgabe, wenn der gemeinsame Ansatz Repositories auf Klassen- und Instanzebene ohne wiederholte oder unzuverlässige Bereinigung abdeckt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
(Documenting test improvement ideas from #1346)
A lot (most?) of our tests require a test server (or several). This typically means moving metadata from sources to a temp directory, serving the temp directory and finally removing the temporary directories. Modified_Testcase handles parts of that but it seems obvious that A) it does not provide the required functionality (as tests re-implement a lot of it) and B) that it is hard to use correctly (as #1346 and many previous issues prove). The end result is that there are temp directories created inside tempdirectories and then those directories may or may not get removed (often in a fairly random order)
The common needs are these I think:
- Test class must be able to serve a repository that all its tests run against
- test instance must be able to serve it's own repository (because it wants to modify the contents)
- the served repository paths must be exposed so the content can be modified during test
We could have a better Modified_Testcase that just always runs one test server per class, and provides helpers to "intitialize a new repo" (copy files from sources into a directory inside the served directory). This way both server startup/shutdown and tempdir management would be handled in one place: the actual test classes would only have to remember to chain up Setup*() and *Teardown() -- if they even need those when Modified_Testcase is better.
- Vorherrschende Sprache
- Python
- Sterne
- 1.7k
- Forks
- 304
- Ø Merge
- 1 T. 2 Std.
- Gemergte PRs (30 T.)
- 17
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus theupdateframework/python-tuf
-
switch to main branch?Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
theupdateframework/python-tuf#3001 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
theupdateframework/python-tuf#2979 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Use Immutable ReleasesOffenenhancement github_actions
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
theupdateframework/python-tuf#2920 · 1 Kommentar · 2 Reaktionen ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
theupdateframework/python-tuf#2842 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
theupdateframework/python-tuf#2836 · 7 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in theupdateframework/python-tuf
Ähnliche Issues
-
documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
kristofdegrave/homeassistant-smart-charging#1413 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
nasa/earthdata-varinfo#113 ·
-
curriculum documentation quality
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
githubnext/gh-aw-workshop#3849 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag