mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-20 19:29:10 +00:00
Fix prometheus upgrade tests (#5926)
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
This commit is contained in:
parent
5eec6a24be
commit
69aae7d7d8
3 changed files with 16 additions and 8 deletions
|
@ -1,11 +1,11 @@
|
|||
name: e2e
|
||||
name: Test Prometheus upgrades
|
||||
on:
|
||||
schedule:
|
||||
- cron: '37 15 * * *' # Every day 15:37
|
||||
|
||||
jobs:
|
||||
e2e-tests:
|
||||
name: E2E tests
|
||||
upgrade-prometheus:
|
||||
name: Upgrade Prometheus
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
|
@ -413,13 +413,22 @@ const (
|
|||
// TestPrometheusVersionUpgrade tests that all Prometheus versions in the compatibility matrix can be upgraded
|
||||
func TestPrometheusVersionUpgrade(t *testing.T) {
|
||||
skipPromVersionUpgradeTests(t)
|
||||
testFuncs := map[string]func(t *testing.T){
|
||||
"PromVersionMigration": testPromVersionMigration,
|
||||
|
||||
testCtx := framework.NewTestCtx(t)
|
||||
defer testCtx.Cleanup(t)
|
||||
|
||||
ns := framework.CreateNamespace(context.Background(), t, testCtx)
|
||||
|
||||
finalizers, err := framework.CreateOrUpdatePrometheusOperator(context.Background(), ns, nil, nil, nil, nil, true, true, true)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
for name, f := range testFuncs {
|
||||
t.Run(name, f)
|
||||
for _, f := range finalizers {
|
||||
testCtx.AddFinalizerFn(f)
|
||||
}
|
||||
|
||||
t.Run("PromVersionMigration", testPromVersionMigration)
|
||||
}
|
||||
|
||||
func testServerTLS(ctx context.Context, namespace string) func(t *testing.T) {
|
||||
|
|
|
@ -870,7 +870,6 @@ func testPromNoServiceMonitorSelector(t *testing.T) {
|
|||
}
|
||||
|
||||
func testPromVersionMigration(t *testing.T) {
|
||||
t.Parallel()
|
||||
testCtx := framework.NewTestCtx(t)
|
||||
defer testCtx.Cleanup(t)
|
||||
ns := framework.CreateNamespace(context.Background(), t, testCtx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue