1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-20 19:29:10 +00:00

Fix prometheus upgrade tests ()

Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
This commit is contained in:
Arthur Silva Sens 2023-09-22 11:19:11 -03:00 committed by GitHub
parent 5eec6a24be
commit 69aae7d7d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 8 deletions

View file

@ -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

View file

@ -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) {

View file

@ -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)