Skip to content

2.6.0: Harness.handle_exec, Harness.add_relation improvements, and more

Compare
Choose a tag to compare
@benhoyt benhoyt released this 30 Aug 21:24
· 1025 commits to main since this release
c4e3266

This release has two significant improvements to testing.Harness:

  • Add Harness.handle_exec to allow charm tests to simulate Container.exec calls (Pebble one-shot commands) and provide expected output. Thanks @weiiwang01 for the design and implementation (PR 993).
  • Simplify adding relation units and relation data by adding app_data and unit_data parameters to Harness.add_relation. Previously, charm tests would have to call add_relation followed by add_relation_unit and update_relation_data -- now only a single add_relation call is required. Implemented in PR 994.

In addition, several small improvements and fixes are included:

  • feat(model): add Secret.unique_identifier (XID part); improve id/label docs in #986
  • fix(testing): ignore push() encoding if source is a binary file or stream in #991
  • fix(pebble): remove use of deprecated cgi module in Pebble code in #996
  • fix(model): ensure Secret.get_content returns a copy of the dict in #1000
  • fix(model): make Secret.set_content invalidate local cache by in #1001

See all changes from 2.5.0 to 2.6.0.