crossplane-contrib / crossplane-contrib/xp-testing

Upgrade tests silently ignore failed provider upgrades

Open
#102 2 comments 0 reactions 1 assignee Claimed by @christophrj View on GitHub
Dominant language
Go
Stars
8
Forks
8
Avg merge
7d 19h
Merged PRs (30d)
2

Description

The `ApplyProvider` function called by `UpgradeProvider` in the `upgrade` package calls `InstallCrossplaneProvider`, which will simply wait for a provider with the name of the provider to be upgraded to become healthy. The issue is that, during the upgrade tests, the provider name will not change, only the version will.

For this reason, if the new provider version cannot be pulled (`ErrImageNeverPull`), the upgrade testing framework will silently ignore this issue because there's still a provider with the expected name that is healthy. The upgrade tests will still run fine, except that they're no longer testing a provider upgrade.

This still happens when using a `mustPullImage` function like in the [example](https://github.com/crossplane-contrib/xp-testing/blob/main/upgrade/main_test.go#L60), for example when testing a provider with double image builds if the upgrade options are misconfigured.

Possible solutions:
* Modifying the provider name
* Checking for a field on the provider to match the expected version

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.