Skip to content

feat: improve test context (#149)#149

Draft
tkrop wants to merge 1 commit into
mainfrom
context
Draft

feat: improve test context (#149)#149
tkrop wants to merge 1 commit into
mainfrom
context

Conversation

@tkrop

@tkrop tkrop commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Description

This pull request improves the usability of the test.Context by applying a generic test.Tester interface, improving the semantic of the test.New(...) function, and adding a generic context.Mode(...) function - currently only used for test.Parallel or test,Sequential test mode setup. However, it may be an idea to also encode the currently separated test expectations test.Success and test.Failure in it.

Besides, this breaking change is simplifying the default setup of new isolated test.Contexts, via the new test.Tester interface, that now allows dedicated access to the test context via its factory functions, so that the new convenience functions test.Run(...), test.RunSeq(...) and test.RunSafe(...) may make naming-wise more sense.

Related Issue(s)

fixes #149.

Testing

Run make test, since the code is highly unit tested.

Checklist

  • I have reviewed and tested the changes thoroughly.
  • I have added appropriate documentation to the code for clarity.
  • I have communicated the consequences of the updates to customers.

Signed-off-by: Tronje Krop tronje.krop@jactors.de

@tkrop tkrop self-assigned this Jun 4, 2026
tkrop added a commit that referenced this pull request Jun 4, 2026
Signed-off-by: Tronje Krop <tronje.krop@jactors.de>
tkrop added a commit that referenced this pull request Jun 5, 2026
Signed-off-by: Tronje Krop <tronje.krop@jactors.de>
tkrop added a commit that referenced this pull request Jun 5, 2026
Signed-off-by: Tronje Krop <tronje.krop@jactors.de>
tkrop added a commit that referenced this pull request Jun 6, 2026
Signed-off-by: Tronje Krop <tronje.krop@jactors.de>
tkrop added a commit that referenced this pull request Jun 6, 2026
Signed-off-by: Tronje Krop <tronje.krop@jactors.de>
tkrop added a commit that referenced this pull request Jun 6, 2026
Signed-off-by: Tronje Krop <tronje.krop@jactors.de>
tkrop added a commit that referenced this pull request Jun 8, 2026
Signed-off-by: Tronje Krop <tronje.krop@jactors.de>
tkrop added a commit that referenced this pull request Jun 8, 2026
Signed-off-by: Tronje Krop <tronje.krop@jactors.de>
Signed-off-by: Tronje Krop <tronje.krop@jactors.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant