Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Improve the upgrade tests for better verification of the resources #166

Merged

Conversation

houshengbo
Copy link

Issue to be fixed

Fixes #

Proposed Changes

Release Note

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: houshengbo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@houshengbo houshengbo force-pushed the check-prow-sources-controller branch 3 times, most recently from 77e555e to 8fe6d49 Compare March 31, 2020 17:57
@houshengbo houshengbo force-pushed the check-prow-sources-controller branch 2 times, most recently from 8fddb4b to aff8d1a Compare March 31, 2020 18:24
@houshengbo houshengbo force-pushed the check-prow-sources-controller branch 3 times, most recently from eef255c to d7bd787 Compare March 31, 2020 19:05
@houshengbo houshengbo changed the title DO NOT MERGE Verify if the deployment exists Improve the upgrade tests for better verification of the resources Mar 31, 2020
@houshengbo houshengbo force-pushed the check-prow-sources-controller branch 2 times, most recently from d8875db to 6263eff Compare March 31, 2020 19:49
resource.SetName("containersources.sources.eventing.knative.dev")
if err := manifest.Client.Delete(resource); err != nil {
return err
// Remove the obsolete CRDs at 0.13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to delete these CRDs? I know there were some historic concerns about deleting them wholesale as part of uninstall.

resource.SetName("cronjobsources.sources.eventing.knative.dev")
if err := manifest.Client.Delete(resource); err != nil {
return err
for _, crd := range crds {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we considered adding a 'delete manifest' where we house cleanups until we get something like the one-off Job's proposed in the Operator re-think? It would be nice to minimize the Operator code changes, imo.

expectedDeployments []string) {
dpList, err := clients.KubeClient.Kube.AppsV1().Deployments(names.Namespace).List(metav1.ListOptions{})
assertEqual(t, err, nil)
assertEqual(t, len(dpList.Items), len(expectedDeployments))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the names of the resources in the equality check? It'd be nice to know what resource leaked from the test failure.

}
}
return false
//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete or uncomment, please

@houshengbo houshengbo force-pushed the check-prow-sources-controller branch 3 times, most recently from 8b8bc39 to 3f740da Compare April 1, 2020 17:43
@houshengbo houshengbo force-pushed the check-prow-sources-controller branch from 3f740da to 89a8e74 Compare April 1, 2020 17:45
@Cynocracy
Copy link
Contributor

/lgtm

@knative-prow-robot knative-prow-robot merged commit 2c9e09f into knative:master Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants