Skip to content

Commit

Permalink
Gnocchi: rename MetricD to Metricd (gophercloud#87)
Browse files Browse the repository at this point in the history
Rename MetricD to Metricd in status package.
Update tests and fixtures.
  • Loading branch information
kolsean authored and ozerovandrei committed May 27, 2019
1 parent b3b2aae commit 25f1b77
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions gnocchi/metric/v1/status/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ type GetResult struct {

// Status represents a Gnocchi status of measurements processing.
type Status struct {
// MetricD represents all running Gnocchi metricd daemons.
MetricD MetricD `json:"metricd"`
// Metricd represents all running Gnocchi metricd daemons.
Metricd Metricd `json:"metricd"`

// Storage contains Gnocchi storage data of measures backlog.
Storage Storage `json:"storage"`
}

// MetricD represents all running Gnocchi metricd daemons.
type MetricD struct {
// Metricd represents all running Gnocchi metricd daemons.
type Metricd struct {
// Processors represents a list of running Gnocchi metricd processors.
Processors []string `json:"processors"`
}
Expand Down
4 changes: 2 additions & 2 deletions gnocchi/metric/v1/status/testing/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const StatusGetWithoutDetailsResult = `
// GetStatusWithDetailsExpected represents an expected response with all status
// attributes from a get request.
var GetStatusWithDetailsExpected = status.Status{
MetricD: status.MetricD{
Metricd: status.Metricd{
Processors: []string{
"node-stat1.27.ce1da3c9-6c8c-490d-b256-3ba1e2bceb7b",
"node-stat1.10.9d9a99b2-f0ac-496b-36f3-115b84304a84",
Expand All @@ -79,7 +79,7 @@ var GetStatusWithDetailsExpected = status.Status{
// GetStatusWithoutDetailsExpected represents an expected response without details
// from a get request.
var GetStatusWithoutDetailsExpected = status.Status{
MetricD: status.MetricD{
Metricd: status.Metricd{
Processors: []string{
"node-stat1.27.ce1da3c9-6c8c-490d-b256-3ba1e2bceb7b",
"node-stat1.10.9d9a99b2-f0ac-496b-36f3-115b84304a84",
Expand Down
4 changes: 2 additions & 2 deletions gnocchi/metric/v1/status/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestGetWithDetails(t *testing.T) {

s, err := status.Get(fake.ServiceClient(), getOpts).Extract()
th.AssertNoErr(t, err)
th.AssertDeepEquals(t, s.MetricD, GetStatusWithDetailsExpected.MetricD)
th.AssertDeepEquals(t, s.Metricd, GetStatusWithDetailsExpected.Metricd)
th.AssertDeepEquals(t, s.Storage, GetStatusWithDetailsExpected.Storage)
}

Expand All @@ -58,6 +58,6 @@ func TestGetWithoutDetails(t *testing.T) {

s, err := status.Get(fake.ServiceClient(), getOpts).Extract()
th.AssertNoErr(t, err)
th.AssertDeepEquals(t, s.MetricD, GetStatusWithoutDetailsExpected.MetricD)
th.AssertDeepEquals(t, s.Metricd, GetStatusWithoutDetailsExpected.Metricd)
th.AssertDeepEquals(t, s.Storage, GetStatusWithoutDetailsExpected.Storage)
}

0 comments on commit 25f1b77

Please sign in to comment.