sumo-check-sumo 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/sumo-check-new-relic-apdex.rb +0 -2
- data/bin/sumo-check-sumo_basic_contact_us_form.rb +12 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 106ec0bd3b4d7cbba003da957fe9cc23a189c43f
|
|
4
|
+
data.tar.gz: 53393a5d0d92cdd169ca7e4dcc2d930172bfaa49
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 622fa100da7d7f7e1a001fdf572d587e29635484d3a6421d742de4a67ac1d82162aa023054bc7c4ea35d6b588e0703fa0c6a22020279fe42b86527b1052bccea
|
|
7
|
+
data.tar.gz: 7aa438c17f2127afadf5da23c716e18046b81e1e28a2cdd6ca174736a373b359393506e918aa1467efc609b33bc2f0506f338d0487d4f259b74457411d31ddb6
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# gem "webdrivers", "~> 3.0"
|
|
3
3
|
require 'watir'
|
|
4
|
-
# require 'webdrivers'
|
|
5
4
|
require 'sensu-plugin/check/cli'
|
|
6
5
|
|
|
7
6
|
class SensuSumoNewRelicAppdex < Sensu::Plugin::Check::CLI
|
|
@@ -84,7 +83,6 @@ class SensuSumoNewRelicAppdex < Sensu::Plugin::Check::CLI
|
|
|
84
83
|
begin
|
|
85
84
|
|
|
86
85
|
browser.link(:id =>"desk-login").click
|
|
87
|
-
# browser.element(:xpath,'//*[@id="login_submit"]').wait_until_present
|
|
88
86
|
browser.element(xpath: "//*[@id=\"login_submit\"]").wait_until_present
|
|
89
87
|
|
|
90
88
|
browser.execute_script("
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# gem "webdrivers", "~> 3.0"
|
|
3
3
|
require 'watir'
|
|
4
|
-
require 'webdrivers'
|
|
5
4
|
require 'sensu-plugin/check/cli'
|
|
6
5
|
|
|
7
6
|
# url = "http://test.sr375.com/test-1.html"
|
|
@@ -14,6 +13,12 @@ class SensuSumoBasicClientTest < Sensu::Plugin::Check::CLI
|
|
|
14
13
|
description: 'URL of test suite',
|
|
15
14
|
default: 'http://sumotest.sumo.com/test-1.html'
|
|
16
15
|
|
|
16
|
+
option :chromedriver,
|
|
17
|
+
:short => "-c /usr/local/bin/chromedriver",
|
|
18
|
+
:long => "--chrome /usr/local/bin/chromedriver",
|
|
19
|
+
:default => '/usr/local/bin/chromedriver',
|
|
20
|
+
:description => "chromedriver location"
|
|
21
|
+
|
|
17
22
|
option :interactive,
|
|
18
23
|
short: '-i',
|
|
19
24
|
long: '--interactive',
|
|
@@ -22,6 +27,8 @@ class SensuSumoBasicClientTest < Sensu::Plugin::Check::CLI
|
|
|
22
27
|
description: 'Run Chrome in an interactive window'
|
|
23
28
|
|
|
24
29
|
def run
|
|
30
|
+
Selenium::WebDriver::Chrome.driver_path = config[:chromedriver]
|
|
31
|
+
|
|
25
32
|
|
|
26
33
|
args = ['--disable-popup-blocking', '--disable-translate']
|
|
27
34
|
if config[:interactive]
|
|
@@ -36,10 +43,10 @@ class SensuSumoBasicClientTest < Sensu::Plugin::Check::CLI
|
|
|
36
43
|
critical(logs.join("\n")) if logs.length > 0
|
|
37
44
|
|
|
38
45
|
begin
|
|
39
|
-
browser.element(:
|
|
40
|
-
browser.element(:
|
|
41
|
-
browser.element(:
|
|
42
|
-
browser.element(:
|
|
46
|
+
browser.element(xpath: '//*[@id="sumome-contactform-bp"]/div/div[2]/div[3]/a').wait_until_present
|
|
47
|
+
browser.element(xpath: '//*[@id="sumome-contactform-bp"]/div/div[2]/div[3]/a').exists? # Powered by Sumo
|
|
48
|
+
browser.element(xpath: '//*[@id="contactform_email_address"]').exists? # Emain address input box
|
|
49
|
+
browser.element(xpath: '//*[@id="contactform_message"]').exists? # contact from message
|
|
43
50
|
rescue Exception => e
|
|
44
51
|
critical(e.message)
|
|
45
52
|
ensure
|