1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-21 03:38:43 +00:00

chore: Fix prometheus 3 tests

Update workflow and e2e tests for Prometheus 3

Related-to 

Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
This commit is contained in:
Jayapriya Pai 2024-09-23 18:14:54 +05:30
parent 23cbc11161
commit c61034952d
2 changed files with 7 additions and 3 deletions
.github/workflows
test/framework

View file

@ -1,12 +1,16 @@
name: e2e-prometheus3
on:
schedule:
- cron: '30 14 * * *' # Every day 14:30
jobs:
e2e-tests:
name: E2E experimental version tests
runs-on: ubuntu-latest
strategy:
# since upgrade test was failing other tests were cancelled, setting this so that other test run
fail-fast: false
matrix:
suite: [alertmanager, prometheus, prometheusAllNS, thanosruler, operatorUpgrade]
include:

View file

@ -179,7 +179,8 @@ func (f *Framework) CreateCertificateResources(namespace, certsDir string, prwtc
func (f *Framework) MakeBasicPrometheus(ns, name, group string, replicas int32) *monitoringv1.Prometheus {
promVersion := operator.DefaultPrometheusVersion
if os.Getenv("TEST_EXPERIMENTAL_PROMETHEUS") == "true" {
// Because Prometheus 3 is supported from version 0.77.0 only
if os.Getenv("TEST_EXPERIMENTAL_PROMETHEUS") == "true" && f.operatorVersion.Minor >= 77 {
promVersion = operator.DefaultPrometheusExperimentalVersion
}
return &monitoringv1.Prometheus{
@ -289,8 +290,7 @@ func (prwtc PromRemoteWriteTestConfig) AddRemoteWriteWithTLSToPrometheus(p *moni
}
func (f *Framework) EnableRemoteWriteReceiverWithTLS(p *monitoringv1.Prometheus) {
p.Spec.EnableFeatures = []monitoringv1.EnableFeature{"remote-write-receiver"}
p.Spec.EnableRemoteWriteReceiver = true
p.Spec.Web = &monitoringv1.PrometheusWebSpec{
WebConfigFileFields: monitoringv1.WebConfigFileFields{
TLSConfig: &monitoringv1.WebTLSConfig{