wavefront-cli 2.15.0 → 2.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wavefront-cli/alert.rb +1 -1
- data/lib/wavefront-cli/version.rb +1 -1
- data/spec/spec_helper.rb +4 -0
- data/spec/wavefront-cli/alert_spec.rb +38 -7
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7bcdc77460e6ee7549d1eb6dae32e5319f7ea74a47a820f27ab99312f50b963
|
4
|
+
data.tar.gz: bfcac8895c3005bf7f516403391b4eab7aef4905fe3e86e186832e031cf6a88f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a670d0670679e424cedf12545d4fcc4f5aae9e79d4e89ea644b7f7633de0efda9a7426472c9eb2c0054f090849774af5cdfe4f3acb1cce5ec1459137fa2aa53e
|
7
|
+
data.tar.gz: ec6445ab10a7510ceb30386e9542aedc0d795dadc3cdbc22be93a759d6309bff728c52b9c914d60a98e33594559bfdfe74aca81145a2583453e145987ee766a3
|
data/lib/wavefront-cli/alert.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
WF_CLI_VERSION = '2.15.
|
1
|
+
WF_CLI_VERSION = '2.15.1'.freeze
|
data/spec/spec_helper.rb
CHANGED
@@ -4,11 +4,25 @@ id = '1481553823153'
|
|
4
4
|
bad_id = '__bad_id__'
|
5
5
|
word = 'alert'
|
6
6
|
|
7
|
+
def search_body(val)
|
8
|
+
{ limit: 999,
|
9
|
+
offset: 0,
|
10
|
+
query: [
|
11
|
+
{ key: 'status',
|
12
|
+
value: val,
|
13
|
+
matchingMethod: 'EXACT' }
|
14
|
+
],
|
15
|
+
sort: { field: 'status', ascending: true } }
|
16
|
+
end
|
17
|
+
|
7
18
|
require_relative '../spec_helper'
|
8
19
|
require_relative "../../lib/wavefront-cli/#{word}"
|
9
20
|
|
10
21
|
describe "#{word} command" do
|
11
22
|
missing_creds(word, ['list', "describe #{id}", "snooze #{id}",
|
23
|
+
'queries', 'snoozed', "install #{id}",
|
24
|
+
"uninstall #{id}", 'firing',
|
25
|
+
'currently firing', 'summary',
|
12
26
|
"delete #{id}", "undelete #{id}", "history #{id}"])
|
13
27
|
list_tests(word)
|
14
28
|
cmd_to_call(word, "describe #{id}", path: "/api/v2/#{word}/#{id}")
|
@@ -35,16 +49,16 @@ describe "#{word} command" do
|
|
35
49
|
method: :post, path: "/api/v2/#{word}/#{id}/snooze")
|
36
50
|
cmd_to_call(word, "search id=#{id}",
|
37
51
|
method: :post, path: "/api/v2/search/#{word}",
|
38
|
-
body:
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
52
|
+
body: { limit: 10,
|
53
|
+
offset: 0,
|
54
|
+
query: [{ key: 'id',
|
55
|
+
value: id,
|
56
|
+
matchingMethod: 'EXACT' }],
|
57
|
+
sort: { field: 'id', ascending: true } },
|
44
58
|
headers: JSON_POST_HEADERS)
|
45
59
|
cmd_to_call(word, "snooze -T 800 #{id}",
|
46
60
|
method: :post,
|
47
|
-
path:
|
61
|
+
path: "/api/v2/#{word}/#{id}/snooze?seconds=800")
|
48
62
|
cmd_to_call(word, "unsnooze #{id}",
|
49
63
|
method: :post, path: "/api/v2/#{word}/#{id}/unsnooze")
|
50
64
|
cmd_to_call(word, "install #{id}",
|
@@ -56,5 +70,22 @@ describe "#{word} command" do
|
|
56
70
|
"undelete #{bad_id}", "snooze #{bad_id}",
|
57
71
|
"install #{bad_id}", "uninstall #{bad_id}",
|
58
72
|
"snooze -T 500 #{bad_id}"])
|
73
|
+
cmd_to_call(word, 'snoozed',
|
74
|
+
method: :post,
|
75
|
+
path: "/api/v2/search/#{word}",
|
76
|
+
body: search_body('snoozed'))
|
77
|
+
cmd_to_call(word, 'firing',
|
78
|
+
method: :post,
|
79
|
+
path: "/api/v2/search/#{word}",
|
80
|
+
body: search_body('firing'))
|
81
|
+
cmd_to_call(word, 'currently firing',
|
82
|
+
method: :post,
|
83
|
+
path: "/api/v2/search/#{word}",
|
84
|
+
body: search_body('firing'))
|
85
|
+
cmd_to_call(word, 'currently in_maintenance',
|
86
|
+
method: :post,
|
87
|
+
path: "/api/v2/search/#{word}",
|
88
|
+
body: search_body('in_maintenance'))
|
89
|
+
cmd_to_call(word, 'queries', path: "/api/v2/#{word}?limit=999&offset=0")
|
59
90
|
tag_tests(word, id, bad_id)
|
60
91
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wavefront-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.15.
|
4
|
+
version: 2.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Fisher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|
@@ -330,8 +330,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
330
330
|
- !ruby/object:Gem::Version
|
331
331
|
version: '0'
|
332
332
|
requirements: []
|
333
|
-
|
334
|
-
rubygems_version: 2.7.8
|
333
|
+
rubygems_version: 3.0.0
|
335
334
|
signing_key:
|
336
335
|
specification_version: 4
|
337
336
|
summary: CLI for Wavefront API v2
|