Style fixes
This commit is contained in:
parent
d6860e4ca4
commit
7c7f0247fc
2 changed files with 5 additions and 7 deletions
|
@ -75,8 +75,8 @@ type Realis interface {
|
||||||
MaintenanceStatus(hosts ...string) (*aurora.Response, *aurora.MaintenanceStatusResult_, error)
|
MaintenanceStatus(hosts ...string) (*aurora.Response, *aurora.MaintenanceStatusResult_, error)
|
||||||
SetQuota(role string, cpu *float64, ram *int64, disk *int64) (*aurora.Response, error)
|
SetQuota(role string, cpu *float64, ram *int64, disk *int64) (*aurora.Response, error)
|
||||||
GetQuota(role string) (*aurora.Response, error)
|
GetQuota(role string) (*aurora.Response, error)
|
||||||
Snapshot() (error)
|
Snapshot() error
|
||||||
PerformBackup() (error)
|
PerformBackup() error
|
||||||
}
|
}
|
||||||
|
|
||||||
type realisClient struct {
|
type realisClient struct {
|
||||||
|
@ -1086,7 +1086,7 @@ func (r *realisClient) GetQuota(role string) (*aurora.Response, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force Aurora Scheduler to perform a snapshot and write to Mesos log
|
// Force Aurora Scheduler to perform a snapshot and write to Mesos log
|
||||||
func (r *realisClient) Snapshot() (error) {
|
func (r *realisClient) Snapshot() error {
|
||||||
|
|
||||||
_, retryErr := r.thriftCallWithRetries(func() (*aurora.Response, error) {
|
_, retryErr := r.thriftCallWithRetries(func() (*aurora.Response, error) {
|
||||||
return r.adminClient.Snapshot()
|
return r.adminClient.Snapshot()
|
||||||
|
@ -1100,7 +1100,7 @@ func (r *realisClient) Snapshot() (error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force Aurora Scheduler to write backup file to a file in the backup directory
|
// Force Aurora Scheduler to write backup file to a file in the backup directory
|
||||||
func (r *realisClient) PerformBackup() (error) {
|
func (r *realisClient) PerformBackup() error {
|
||||||
|
|
||||||
_, retryErr := r.thriftCallWithRetries(func() (*aurora.Response, error) {
|
_, retryErr := r.thriftCallWithRetries(func() (*aurora.Response, error) {
|
||||||
return r.adminClient.PerformBackup()
|
return r.adminClient.PerformBackup()
|
||||||
|
|
|
@ -149,10 +149,8 @@ func TestRealisClient_CreateJob_Thermos(t *testing.T) {
|
||||||
assert.Equal(t, len(result.Configs), 1)
|
assert.Equal(t, len(result.Configs), 1)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Test asking the scheduler to perform a Snpshot
|
// Test asking the scheduler to perform a Snpshot
|
||||||
t.Run("TestRealisClient_Snapshot", func (t *testing.T) {
|
t.Run("TestRealisClient_Snapshot", func(t *testing.T) {
|
||||||
err := r.Snapshot()
|
err := r.Snapshot()
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue