File: fixtures.go

package info (click to toggle)
golang-github-gophercloud-utils 0.0~git20231010.80377ec-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 816 kB
  • sloc: sh: 20; makefile: 7
file content (95 lines) | stat: -rw-r--r-- 2,805 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
package testing

import "github.com/gophercloud/utils/gnocchi/metric/v1/status"

// StatusGetWithDetailsResult represents raw server response with all status attributes
// from a server to a get request.
const StatusGetWithDetailsResult = `
{
    "metricd": {
        "processors": [
            "node-stat1.27.ce1da3c9-6c8c-490d-b256-3ba1e2bceb7b",
            "node-stat1.10.9d9a99b2-f0ac-496b-36f3-115b84304a84",
            "node-stat1.23.915e39c0-4002-489c-87bd-9055033d440c"
        ]
    },
    "storage": {
        "measures_to_process": {
            "002583fd-edc7-47c1-a253-b0575b7ebfe8": 1,
            "0028fe48-c7a9-4515-91ac-c17b4eade4d4": 1,
            "002d65fe-56bc-4f52-8c71-da87cd82c436": 23,
            "003ead5d-657a-4ac0-be0d-d0ab3be9590e": 4,
            "009c537v-58f4-4dc6-ba9c-e931d3e57565": 1,
            "009cc1eg-2337-4171-930e-75cd54bf6de1": 2
        },
        "summary": {
            "measures": 32,
            "metrics": 6
        }
    }
}
`

// StatusGetWithoutDetailsResult represents raw server response without details
// from a server to a get request.
const StatusGetWithoutDetailsResult = `
{
    "metricd": {
        "processors": [
            "node-stat1.27.ce1da3c9-6c8c-490d-b256-3ba1e2bceb7b",
            "node-stat1.10.9d9a99b2-f0ac-496b-36f3-115b84304a84",
            "node-stat1.23.915e39c0-4002-489c-87bd-9055033d440c"
        ]
    },
    "storage": {
        "summary": {
            "measures": 32,
            "metrics": 6
        }
    }
}
`

// GetStatusWithDetailsExpected represents an expected response with all status
// attributes from a get request.
var GetStatusWithDetailsExpected = status.Status{
	Metricd: status.Metricd{
		Processors: []string{
			"node-stat1.27.ce1da3c9-6c8c-490d-b256-3ba1e2bceb7b",
			"node-stat1.10.9d9a99b2-f0ac-496b-36f3-115b84304a84",
			"node-stat1.23.915e39c0-4002-489c-87bd-9055033d440c",
		},
	},
	Storage: status.Storage{
		MeasuresToProcess: map[string]int{
			"002583fd-edc7-47c1-a253-b0575b7ebfe8": 1,
			"0028fe48-c7a9-4515-91ac-c17b4eade4d4": 1,
			"002d65fe-56bc-4f52-8c71-da87cd82c436": 23,
			"003ead5d-657a-4ac0-be0d-d0ab3be9590e": 4,
			"009c537v-58f4-4dc6-ba9c-e931d3e57565": 1,
			"009cc1eg-2337-4171-930e-75cd54bf6de1": 2,
		},
		Summary: status.Summary{
			Measures: 32,
			Metrics:  6,
		},
	},
}

// GetStatusWithoutDetailsExpected represents an expected response without details
// from a get request.
var GetStatusWithoutDetailsExpected = status.Status{
	Metricd: status.Metricd{
		Processors: []string{
			"node-stat1.27.ce1da3c9-6c8c-490d-b256-3ba1e2bceb7b",
			"node-stat1.10.9d9a99b2-f0ac-496b-36f3-115b84304a84",
			"node-stat1.23.915e39c0-4002-489c-87bd-9055033d440c",
		},
	},
	Storage: status.Storage{
		Summary: status.Summary{
			Measures: 32,
			Metrics:  6,
		},
	},
}