wavefront-sdk 4.0.0 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +42 -1
- data/HISTORY.md +12 -0
- data/README.md +3 -2
- data/lib/wavefront-sdk/account.rb +104 -3
- data/lib/wavefront-sdk/api_mixins/user.rb +10 -0
- data/lib/wavefront-sdk/core/exception.rb +1 -0
- data/lib/wavefront-sdk/defs/version.rb +1 -1
- data/lib/wavefront-sdk/paginator/base.rb +21 -15
- data/lib/wavefront-sdk/query.rb +0 -1
- data/lib/wavefront-sdk/role.rb +104 -0
- data/lib/wavefront-sdk/spy.rb +126 -0
- data/lib/wavefront-sdk/stdlib/array.rb +1 -1
- data/lib/wavefront-sdk/user.rb +31 -0
- data/lib/wavefront-sdk/usergroup.rb +17 -16
- data/lib/wavefront-sdk/validators.rb +18 -7
- data/spec/.rubocop.yml +41 -0
- data/spec/wavefront-sdk/account_spec.rb +107 -1
- data/spec/wavefront-sdk/metric_helper_spec.rb +1 -1
- data/spec/wavefront-sdk/role_spec.rb +68 -0
- data/spec/wavefront-sdk/{unstable/spy_spec.rb → spy_spec.rb} +3 -3
- data/spec/wavefront-sdk/user_spec.rb +8 -0
- data/spec/wavefront-sdk/usergroup_spec.rb +21 -11
- data/spec/wavefront-sdk/validators_spec.rb +10 -0
- data/wavefront-sdk.gemspec +2 -2
- metadata +12 -12
- data/lib/wavefront-sdk/monitoredcluster.rb +0 -93
- data/lib/wavefront-sdk/unstable/spy.rb +0 -134
- data/spec/wavefront-sdk/monitoredcluster_spec.rb +0 -55
@@ -1,55 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require_relative '../spec_helper'
|
5
|
-
require_relative '../test_mixins/general'
|
6
|
-
require_relative '../test_mixins/tag'
|
7
|
-
|
8
|
-
# Unit tests for MonitoredCluster class
|
9
|
-
#
|
10
|
-
class WavefrontMonitoredClusterTest < WavefrontTestBase
|
11
|
-
include WavefrontTest::Create
|
12
|
-
include WavefrontTest::Delete
|
13
|
-
include WavefrontTest::Describe
|
14
|
-
include WavefrontTest::List
|
15
|
-
include WavefrontTest::Update
|
16
|
-
include WavefrontTest::Tag
|
17
|
-
|
18
|
-
def test_merge
|
19
|
-
assert_puts("/api/v2/monitoredcluster/merge/#{id}/#{id2}", nil, :json) do
|
20
|
-
wf.merge(id, id2)
|
21
|
-
end
|
22
|
-
|
23
|
-
assert_invalid_id { wf.merge(id, invalid_id) }
|
24
|
-
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
def api_class
|
29
|
-
'monitoredcluster'
|
30
|
-
end
|
31
|
-
|
32
|
-
def id
|
33
|
-
'k8s-sample'
|
34
|
-
end
|
35
|
-
|
36
|
-
def id2
|
37
|
-
'eks-cluster'
|
38
|
-
end
|
39
|
-
|
40
|
-
def invalid_id
|
41
|
-
'!!!!'
|
42
|
-
end
|
43
|
-
|
44
|
-
def payload
|
45
|
-
{ id: 'k8s-sample',
|
46
|
-
name: 'Sample cluster',
|
47
|
-
platform: 'EKS',
|
48
|
-
version: '1.2',
|
49
|
-
additionalTags: {
|
50
|
-
region: 'us-west-2',
|
51
|
-
az: 'testing'
|
52
|
-
},
|
53
|
-
tags: %w[alertTag1] }
|
54
|
-
end
|
55
|
-
end
|