Complete test for get SourcesID
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>pull/3233/head
parent
807c9b50bd
commit
c3bed99a92
|
@ -236,6 +236,7 @@ type Source struct {
|
||||||
Telegraf string `json:"telegraf"` // Telegraf is the db telegraf is written to. By default it is "telegraf"
|
Telegraf string `json:"telegraf"` // Telegraf is the db telegraf is written to. By default it is "telegraf"
|
||||||
Organization string `json:"organization"` // Organization is the organization ID that resource belongs to
|
Organization string `json:"organization"` // Organization is the organization ID that resource belongs to
|
||||||
Role string `json:"role,omitempty"` // Not Currently Used. Role is the name of the minimum role that a user must possess to access the resource.
|
Role string `json:"role,omitempty"` // Not Currently Used. Role is the name of the minimum role that a user must possess to access the resource.
|
||||||
|
DefaultRP string `json:"defaultRP"` // DefaultRP is the default retention policy used in database queries to this source
|
||||||
}
|
}
|
||||||
|
|
||||||
// SourcesStore stores connection information for a `TimeSeries`
|
// SourcesStore stores connection information for a `TimeSeries`
|
||||||
|
|
|
@ -440,7 +440,8 @@ func TestService_SourcesID(t *testing.T) {
|
||||||
ID: "1",
|
ID: "1",
|
||||||
wantStatusCode: 200,
|
wantStatusCode: 200,
|
||||||
wantContentType: "application/json",
|
wantContentType: "application/json",
|
||||||
wantBody: `{"id":"1","name":"","url":"","default":false,"telegraf":"telegraf","organization":"","links":{"self":"/chronograf/v1/sources/1","kapacitors":"/chronograf/v1/sources/1/kapacitors","proxy":"/chronograf/v1/sources/1/proxy","queries":"/chronograf/v1/sources/1/queries","write":"/chronograf/v1/sources/1/write","permissions":"/chronograf/v1/sources/1/permissions","users":"/chronograf/v1/sources/1/users","databases":"/chronograf/v1/sources/1/dbs","annotations":"/chronograf/v1/sources/1/annotations","health":"/chronograf/v1/sources/1/health"}, "defaultRP":""}`,
|
wantBody: `{"id":"1","name":"","url":"","default":false,"telegraf":"telegraf","organization":"","defaultRP":"","links":{"self":"/chronograf/v1/sources/1","kapacitors":"/chronograf/v1/sources/1/kapacitors","proxy":"/chronograf/v1/sources/1/proxy","queries":"/chronograf/v1/sources/1/queries","write":"/chronograf/v1/sources/1/write","permissions":"/chronograf/v1/sources/1/permissions","users":"/chronograf/v1/sources/1/users","databases":"/chronograf/v1/sources/1/dbs","annotations":"/chronograf/v1/sources/1/annotations","health":"/chronograf/v1/sources/1/health"}}
|
||||||
|
`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
|
Loading…
Reference in New Issue