Skip to content

Add exact-output assertion for schedule create example normalization #252

Description

@coderabbitai

Summary

Add an exact-output assertion to TestReplaceVeleroWithOADP_ScheduleCreateVerbFirst in cmd/root_test.go.

Required change

Keep the existing checks for the removal of velero create schedule and the occurrence count. Also compare cmd.Example with the complete expected normalized example string. The failure output must show the expected and actual strings.

Rationale

The occurrence-count check verifies only part of the replacement. An exact-output assertion verifies the complete transformed command text, including both velero create schedule NAME replacements and the surrounding content.

Affected area

  • cmd/root_test.go
  • TestReplaceVeleroWithOADP_ScheduleCreateVerbFirst

Acceptance criteria

  • The test declares the complete expected normalized example text.
  • The test compares cmd.Example to that expected text.
  • A test failure reports both the expected and actual values.
  • Existing relevant assertions remain valid or are replaced by the exact-output assertion where redundant.

Backlinks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions