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

Krew upgrade needs integration test #233

Closed
corneliusweig opened this issue Jun 30, 2019 · 2 comments · Fixed by #242
Closed

Krew upgrade needs integration test #233

corneliusweig opened this issue Jun 30, 2019 · 2 comments · Fixed by #242
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@corneliusweig
Copy link
Contributor

Krew upgrade is currently not covered by integration tests, because it requires a more advanced test setup. What the integration test should do:

  • Install an old plugin version
  • Verify that the old version is installed
  • Run krew upgrade
  • Verify that the new version is installed

The tricky part is to reliably get two plugin versions in the test. One way to do this, could be to install a fixture version with the --manifest option. To verify that the original version and the eventual version are actually different, one could take the hash of a file that must change during upgrade.

@ahmetb
Copy link
Member

ahmetb commented Jul 1, 2019

Yeah, we'd need --manifest because krew upgrade calls krew update internally, which would undo if you were overwriting the manifest file in the index.

We'd just need to vendor the old file into testdata/ and keep it up-to-date (compliant with the current version).

/kind bug
/priority important-soon

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Jul 2, 2019
@corneliusweig
Copy link
Contributor Author

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants