github.com/argoproj/argo-cd/v2@v2.10.5/test/e2e/fixture/notification/actions.go (about)

     1  package notification
     2  
     3  import (
     4  	"time"
     5  
     6  	"github.com/argoproj/argo-cd/v2/test/e2e/fixture"
     7  )
     8  
     9  // this implements the "when" part of given/when/then
    10  //
    11  // none of the func implement error checks, and that is complete intended, you should check for errors
    12  // using the Then()
    13  type Actions struct {
    14  	context *Context
    15  }
    16  
    17  func (a *Actions) SetParamInNotificationConfigMap(key, value string) *Actions {
    18  	fixture.SetParamInNotificationsConfigMap(key, value)
    19  	return a
    20  }
    21  
    22  func (a *Actions) Then() *Consequences {
    23  	a.context.t.Helper()
    24  	// in case any settings have changed, pause for 1s, not great, but fine
    25  	time.Sleep(1 * time.Second)
    26  	return &Consequences{a.context, a}
    27  }