forked from knative/serving
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate upgrade tests to the new framework (knative#10216)
* Migrate upgrade tests to using pkg/test/upgrade framework * Convert AssertAutoscaleUpToNumPods and inner functions to helper functions that return error instead of calling t.Fatal to fail the current test. Avoid using *testing.T so that these functions can be reused outside of tests or span multiple tests. * The autoscaler helper functions are used in upgrade tests where "setup" and "verify" phases run within different tests. Pull test.EnsureTearDown from SetupSvc to ensure that a kservice is not destroyed at the end of the first phase ("setup") but remains active until "verify" phase. This is ensured by calling EnsureTearDown later in the "verify" phase. * Adjust Bash scripts to avoid unbound variable errors during upgrade tests exexution (due to using -u flag by the upgrade framework). * Use umbrella functions for individual groups of tests That's for easy reuse in other repos such as knative/operator * Define curPods and targetPods constants in upgrade tests * Fix imports and licences * Fix lint - comments on new exported functions * Split AssertAutoscaleUpToNumPods into setup and wait parts * Pass errgroup by reference * Fix lint error * Move logf into TestContext * Remaining fixes for moving logf to TestContext * Call logf on context directly * Update readme * Remove the comment and fix imports * Update modules after running update-codegen * Do not upgrade Ingress when upgrading Knative * autoscale and prober tests will fail if ingress is replaced during upgrade * Pass around func() error instead of errGroup * Mark a few functions as t.Helper() * Fix codegen
- Loading branch information
Showing
36 changed files
with
1,851 additions
and
370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.