sumo-check-sumo 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46780f5f6a848f3277f79578f16cab1ad5aead23
4
- data.tar.gz: b875e3880e1c3b82a039283c0bdbc518a9afa918
3
+ metadata.gz: 106ec0bd3b4d7cbba003da957fe9cc23a189c43f
4
+ data.tar.gz: 53393a5d0d92cdd169ca7e4dcc2d930172bfaa49
5
5
  SHA512:
6
- metadata.gz: cd4b4ac27cc40744be768087389b45fb66fc1807837dd6f6fc4585816cee097c82ba4437afe2a889415f5e7b61666d7babc89987ddc275d4d4139057508627e6
7
- data.tar.gz: 2cb8e1e8c9c1168345a69904459d1f6cea48d13e111fae64f2fcdb4467ec816c6f1745234fdf478f9ed2a4680eee93c83225313311dd5727149702863bf18df4
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(:xpath,'//*[@id="sumome-contactform-bp"]/div/div[2]/div[3]/a').wait_until_present
40
- browser.element(:xpath,'//*[@id="sumome-contactform-bp"]/div/div[2]/div[3]/a').exists? # Powered by Sumo
41
- browser.element(:xpath,'//*[@id="contactform_email_address"]').exists? # Emain address input box
42
- browser.element(:xpath, '//*[@id="contactform_message"]').exists? # contact from message
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sumo-check-sumo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dr. Ogg