taf 0.4.4 → 0.4.5
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12ebfddff9dbe3828c881adcfa902215434fea99b5ed47af92dbd89431fe7bd1
|
4
|
+
data.tar.gz: 23f1b651a5f4774611b8d0a6a30ec84d8231700c8e1ec30df39f37ea4a4351bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eea80be5461d272a812876380914b86e8c3ca31c5452604dc2f1b6afb40acd05accfbf38afc1f070042d3982d8e523476c852824ebbef9d0d944e8b766d89435
|
7
|
+
data.tar.gz: c5369e634720edc5b53d545fe66b846f914b85e1c38a8acdc3d3ff9ff967fd1e1e4ff0cce5302d0bbd51f632a6973314f4fd73148a04037e9bc81e4c668db8f9
|
@@ -3,24 +3,25 @@
|
|
3
3
|
module Taf
|
4
4
|
module TestSteps
|
5
5
|
module Handlers
|
6
|
-
#
|
7
|
-
class
|
8
|
-
register :
|
6
|
+
# Health Check function to check the status of a web address or ip.
|
7
|
+
class HealthCheck < Base
|
8
|
+
register :health_check
|
9
9
|
|
10
10
|
def perform
|
11
11
|
tries ||= 20
|
12
|
-
Faraday.get(@value)
|
12
|
+
res = Faraday.get(@value)
|
13
|
+
status = res.status
|
13
14
|
rescue Faraday::Error
|
14
15
|
if (tries -= 1).positive?
|
15
16
|
sleep 1
|
16
17
|
puts "Failed to ping: #{@value} - Retries left: #{tries}"
|
17
18
|
retry
|
18
19
|
else
|
19
|
-
Taf::MyLog.log.warn("
|
20
|
+
Taf::MyLog.log.warn("Site Error: #{@value} status code: #{status}")
|
20
21
|
false
|
21
22
|
end
|
22
23
|
else
|
23
|
-
Taf::MyLog.log.info("
|
24
|
+
Taf::MyLog.log.info("Site: #{@value} status code: #{status}")
|
24
25
|
true
|
25
26
|
end
|
26
27
|
end
|
data/lib/taf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Perrett
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -204,11 +204,11 @@ files:
|
|
204
204
|
- lib/taf/test_steps/handlers/base/execute_system_command.rb
|
205
205
|
- lib/taf/test_steps/handlers/base/generate_token.rb
|
206
206
|
- lib/taf/test_steps/handlers/base/handle_browser_window.rb
|
207
|
+
- lib/taf/test_steps/handlers/base/health_check.rb
|
207
208
|
- lib/taf/test_steps/handlers/base/ipause.rb
|
208
209
|
- lib/taf/test_steps/handlers/base/list_all_dropdowns_values.rb
|
209
210
|
- lib/taf/test_steps/handlers/base/login.rb
|
210
211
|
- lib/taf/test_steps/handlers/base/open_url.rb
|
211
|
-
- lib/taf/test_steps/handlers/base/ping_test.rb
|
212
212
|
- lib/taf/test_steps/handlers/base/radio_button.rb
|
213
213
|
- lib/taf/test_steps/handlers/base/select_dropdown.rb
|
214
214
|
- lib/taf/test_steps/handlers/base/send_special_keys.rb
|