Files
0d2783075a test(e2e): add isolation by ensuring unique name (cherry-pick #25724 for 3.3) (#26287)
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Kanika Rana <[email protected]>
Signed-off-by: Kanika Rana <[email protected]>
Signed-off-by: Oliver Gondža <[email protected]>
Co-authored-by: Alexandre Gaudreault <[email protected]>
Co-authored-by: Oliver Gondža <[email protected]>
2026-02-12 14:31:21 +02:00

41 lines
921 B
Go

package notification
import (
"time"
"github.com/stretchr/testify/require"
"github.com/argoproj/argo-cd/v3/test/e2e/fixture"
)
// this implements the "when" part of given/when/then
//
// none of the func implement error checks, and that is complete intended, you should check for errors
// using the Then()
type Actions struct {
context *Context
healthy bool
}
func (a *Actions) SetParamInNotificationConfigMap(key, value string) *Actions {
a.context.T().Helper()
require.NoError(a.context.T(), fixture.SetParamInNotificationsConfigMap(key, value))
return a
}
func (a *Actions) Then() *Consequences {
a.context.T().Helper()
time.Sleep(fixture.WhenThenSleepInterval)
return &Consequences{a.context, a}
}
func (a *Actions) Healthcheck() *Actions {
a.context.T().Helper()
_, err := fixture.DoHttpRequest("GET",
"/metrics",
fixture.GetNotificationServerAddress())
a.healthy = err == nil
return a
}