Skip to content

Integration tests #1606

@GideonBear

Description

@GideonBear

Checklist

  • I have searched the issue tracker for relevant or duplicate issues.

I want to suggest some general feature

See a1fd324

Topgrade should have integration tests run in CI for each step, where the step is actually ran and verified that an update happened

Integration tests should be placed in the same file as the step (we probably want to split each step into its own file before starting on integration tests).
Integration tests should be ran only in CI or a container or whatever. Ideally they should be ran as normal cargo tests, but with a certain flag active? Then it should be made really clear not to use to flag on your dev machine.

A test for a step should roughly consist of the following:

  1. Install the thing it should update (e.g. a package manager and a single package), with a specific old version
  2. Verify version == old
  3. Run topgrade --only that_step, check success
  4. Verify version > old (latest)
  5. Run topgrade --only that_step, check success
  6. Verify version == version from step 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs discussionThis feature request needs discussion, or this bug needs discussion about the solution

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions