fix CI error
This commit is contained in:
parent
3297389b76
commit
78c5c7d643
1 changed files with 9 additions and 9 deletions
|
@ -516,7 +516,7 @@ func TestRealisClient_ScheduleCronJob_Thermos(t *testing.T) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
func TestRealisClient_StartMaintenance(t *testing.T) {
|
func TestRealisClient_StartMaintenance(t *testing.T) {
|
||||||
hosts := []string{"localhost"}
|
hosts := []string{"agent-one"}
|
||||||
_, err := r.StartMaintenance(hosts...)
|
_, err := r.StartMaintenance(hosts...)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
@ -526,7 +526,7 @@ func TestRealisClient_StartMaintenance(t *testing.T) {
|
||||||
[]aurora.MaintenanceMode{aurora.MaintenanceMode_SCHEDULED},
|
[]aurora.MaintenanceMode{aurora.MaintenanceMode_SCHEDULED},
|
||||||
1*time.Second,
|
1*time.Second,
|
||||||
50*time.Second)
|
50*time.Second)
|
||||||
assert.Equal(t, map[string]bool{"localhost": true}, hostResults)
|
assert.Equal(t, map[string]bool{"agent-one": true}, hostResults)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
_, err = r.EndMaintenance(hosts...)
|
_, err = r.EndMaintenance(hosts...)
|
||||||
|
@ -542,7 +542,7 @@ func TestRealisClient_StartMaintenance(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRealisClient_DrainHosts(t *testing.T) {
|
func TestRealisClient_DrainHosts(t *testing.T) {
|
||||||
hosts := []string{"localhost"}
|
hosts := []string{"agent-one"}
|
||||||
_, err := r.DrainHosts(hosts...)
|
_, err := r.DrainHosts(hosts...)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
@ -552,7 +552,7 @@ func TestRealisClient_DrainHosts(t *testing.T) {
|
||||||
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING},
|
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING},
|
||||||
1*time.Second,
|
1*time.Second,
|
||||||
50*time.Second)
|
50*time.Second)
|
||||||
assert.Equal(t, map[string]bool{"localhost": true}, hostResults)
|
assert.Equal(t, map[string]bool{"agent-one": true}, hostResults)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
t.Run("TestRealisClient_MonitorNontransitioned", func(t *testing.T) {
|
t.Run("TestRealisClient_MonitorNontransitioned", func(t *testing.T) {
|
||||||
|
@ -565,7 +565,7 @@ func TestRealisClient_DrainHosts(t *testing.T) {
|
||||||
|
|
||||||
// Assert monitor returned an error that was not nil, and also a list of the non-transitioned hosts
|
// Assert monitor returned an error that was not nil, and also a list of the non-transitioned hosts
|
||||||
assert.Error(t, err)
|
assert.Error(t, err)
|
||||||
assert.Equal(t, map[string]bool{"localhost": true, "IMAGINARY_HOST": false}, hostResults)
|
assert.Equal(t, map[string]bool{"agent-one": true, "IMAGINARY_HOST": false}, hostResults)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("TestRealisClient_EndMaintenance", func(t *testing.T) {
|
t.Run("TestRealisClient_EndMaintenance", func(t *testing.T) {
|
||||||
|
@ -584,7 +584,7 @@ func TestRealisClient_DrainHosts(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRealisClient_SLADrainHosts(t *testing.T) {
|
func TestRealisClient_SLADrainHosts(t *testing.T) {
|
||||||
hosts := []string{"localhost"}
|
hosts := []string{"agent-one"}
|
||||||
policy := aurora.SlaPolicy{PercentageSlaPolicy: &aurora.PercentageSlaPolicy{Percentage: 50.0}}
|
policy := aurora.SlaPolicy{PercentageSlaPolicy: &aurora.PercentageSlaPolicy{Percentage: 50.0}}
|
||||||
|
|
||||||
_, err := r.SLADrainHosts(&policy, 30, hosts...)
|
_, err := r.SLADrainHosts(&policy, 30, hosts...)
|
||||||
|
@ -599,7 +599,7 @@ func TestRealisClient_SLADrainHosts(t *testing.T) {
|
||||||
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING},
|
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING},
|
||||||
1*time.Second,
|
1*time.Second,
|
||||||
50*time.Second)
|
50*time.Second)
|
||||||
assert.Equal(t, map[string]bool{"localhost": true}, hostResults)
|
assert.Equal(t, map[string]bool{"agent-one": true}, hostResults)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
_, err = r.EndMaintenance(hosts...)
|
_, err = r.EndMaintenance(hosts...)
|
||||||
|
@ -624,7 +624,7 @@ func TestRealisClient_SLADrainHosts(t *testing.T) {
|
||||||
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING},
|
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING},
|
||||||
1*time.Second,
|
1*time.Second,
|
||||||
50*time.Second)
|
50*time.Second)
|
||||||
assert.Equal(t, map[string]bool{"localhost": true}, hostResults)
|
assert.Equal(t, map[string]bool{"agent-one": true}, hostResults)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
_, err = r.EndMaintenance(hosts...)
|
_, err = r.EndMaintenance(hosts...)
|
||||||
|
@ -640,7 +640,7 @@ func TestRealisClient_SLADrainHosts(t *testing.T) {
|
||||||
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING},
|
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED, aurora.MaintenanceMode_DRAINING},
|
||||||
1*time.Second,
|
1*time.Second,
|
||||||
50*time.Second)
|
50*time.Second)
|
||||||
assert.Equal(t, map[string]bool{"localhost": true}, hostResults)
|
assert.Equal(t, map[string]bool{"agent-one": true}, hostResults)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
_, err = r.EndMaintenance(hosts...)
|
_, err = r.EndMaintenance(hosts...)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue