Event system alpha experiment (#18795)
This commit is contained in:
parent
15ae00d147
commit
fc378c0908
|
@ -1,4 +1,4 @@
|
|||
```release-note:improvement
|
||||
core: Add experiments system and `events.beta1` experiment.
|
||||
core: Add experiments system and `events.alpha1` experiment.
|
||||
```
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package experiments
|
||||
|
||||
const VaultExperimentEventsBeta1 = "events.beta1"
|
||||
const VaultExperimentEventsAlpha1 = "events.alpha1"
|
||||
|
||||
var validExperiments = []string{
|
||||
VaultExperimentEventsBeta1,
|
||||
VaultExperimentEventsAlpha1,
|
||||
}
|
||||
|
||||
// ValidExperiments exposes the list without exposing a mutable global variable.
|
||||
|
|
|
@ -1269,7 +1269,7 @@ func NewCore(conf *CoreConfig) (*Core, error) {
|
|||
return nil, err
|
||||
}
|
||||
c.events = events
|
||||
if c.isExperimentEnabled(experiments.VaultExperimentEventsBeta1) {
|
||||
if c.isExperimentEnabled(experiments.VaultExperimentEventsAlpha1) {
|
||||
c.events.Start()
|
||||
}
|
||||
|
||||
|
|
|
@ -5466,7 +5466,7 @@ func TestSystemBackend_ReadExperiments(t *testing.T) {
|
|||
|
||||
for name, tc := range map[string][]string{
|
||||
"no experiments enabled": {},
|
||||
"one experiment enabled": {experiments.VaultExperimentEventsBeta1},
|
||||
"one experiment enabled": {experiments.VaultExperimentEventsAlpha1},
|
||||
} {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
// Set the enabled experiments.
|
||||
|
|
|
@ -37,7 +37,7 @@ $ curl \
|
|||
"renewable": false,
|
||||
"data": {
|
||||
"available": [
|
||||
"events.beta1"
|
||||
"events.alpha1"
|
||||
],
|
||||
"enabled": []
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue