Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clearly deprecate Harness in the testing how-tos #1508

Merged
merged 6 commits into from
Dec 19, 2024

Conversation

tonyandrewmeyer
Copy link
Contributor

@tonyandrewmeyer tonyandrewmeyer commented Dec 18, 2024

Small adjustments to the how-to guides on testing to make it clear that Harness is deprecated:

  • Tweak the general guide so that it's still basically saying the same thing, but refers to Scenario rather than Harness.
  • Adjust example tests to use ops.testing Scenario classes rather than Harness.
  • Make sure it's clear that ops[testing] should be installed to write unit tests.
  • Use Scenario from ops.testing rather than from scenario.

Note that this does not substantially change the testing documentation: there's a roadmap item to do that later in 25.04.

Live preview

@tonyandrewmeyer
Copy link
Contributor Author

@tmihoc if you have time, feel free to review this, but no problem if not :)

Copy link
Collaborator

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks. Approving with some suggested tweaks.

I also noticed that there's a broken link on this page: https://ops.readthedocs.io/en/latest/explanation/testing.html

ops.testing.Harness and/or {ref}``ops-scenario

Can we fix that while we're here?

docs/howto/get-started-with-charm-testing.md Outdated Show resolved Hide resolved
docs/howto/get-started-with-charm-testing.md Outdated Show resolved Hide resolved
docs/howto/get-started-with-charm-testing.md Outdated Show resolved Hide resolved
docs/howto/get-started-with-charm-testing.md Outdated Show resolved Hide resolved
docs/howto/write-scenario-tests-for-a-charm.md Outdated Show resolved Hide resolved
Copy link
Contributor

@dwilding dwilding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks Tony! I've added a couple of comments about the framework name

@tonyandrewmeyer tonyandrewmeyer merged commit 91a4ea4 into canonical:main Dec 19, 2024
32 checks passed
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.

3 participants