Feature Request: Tests filters in pipeline
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 28/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Bereich
- testing
Rechercherichtung
Beginne damit, OpenTabletDriver.Plugin/Output/OutputMode.cs um die Zeilen 62–90 zu lesen, um zu verstehen, wie PipelinePosition die Einfügung von Filtern steuert. Lege zunächst den Testansatz für 0.6.x fest und decke anschließend nicht konsumierte IDeviceReports sowie ungültige PipelinePosition-Werte ab, ohne die Abdeckung der 0.5.x-APIs wesentlich auszuweiten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
The OpenTabletDriver 0.6.x plugin pipeline has edge cases that can cause filter plugins to incorrectly drop reports.
For plugins with filters targeting the 0.6.x plugin API the following tests should be done.
Plugins targeting earlier API's like 0.5.x should preferably not be covered if it significantly increases the amount of code to maintain.
It is unclear how to implement these tests properly. I currently have 2 ideas:
- Have a separate repository that can be targeted as a GitHub action, that tests the filter in a virtual pipeline, which could be used to test pull requests on this repository in some way.
- Driver gets a "Plugin Developer" mode that would actively check active filters for these issues - this would help plugin developers from making these mistakes unintentionally.
While outside of the scope of this issue, future driver plugin API's should preferably be designed in a way that removes these necessary tests.
Minimum Test Coverage
At the very minimum, the tests should check for the following
Properly passes through IDeviceReports
Some filters incorrectly only pass through ITabletReports. Normal filters should ensure Consume(IDeviceReport) runs Emit?.Invoke(). Async filters should ensure ConsumeState() runs OnEmit() (or Emit?.Invoke()) on unconsumed reports.
Sets a PipelinePosition that isn't PreTransform or PostTransform (or an alias)
Currently, the driver only links filters that have a PipelinePosition with one of the above values as seen here:
https://github.com/OpenTabletDriver/OpenTabletDriver/blob/aa345e5b7365647f25c8651f3e35fb7dd4c13676/OpenTabletDriver.Plugin/Output/OutputMode.cs#L62-L90
This means that a PipelinePosition of e.g. 0 would result in the filter never being inserted into the pipeline.
If you think of anything else that would be worth testing for, please let us know here.
- Vorherrschende Sprache
- Shell
- Sterne
- 8
- Forks
- 39
- Ø Merge
- 2 T. 13 Min.
- Gemergte PRs (30 T.)
- 4
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
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 OpenTabletDriver/Plugin-Repository
-
Add simple PR testsOffenenhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
OpenTabletDriver/Plugin-Repository#77 · 4 Kommentare ·
Alle Issues in OpenTabletDriver/Plugin-Repository
Ähnliche Issues
-
rebrand-literal-gutter: uhttpd section-vocabulary check trips on a COMMENT (uhttpd.luci in 92-tollgate-admin-setup:178)Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
OpenTollGate/tollgate-module-basic-go#723 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
stephrobert/pavois#390 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
shukiv/jabali-panel#2041 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag