elasticsearch-test-runner 0.14.0 → 0.15.0
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/CHANGELOG.md +5 -0
- data/lib/elasticsearch/tests/printer.rb +17 -11
- data/lib/elasticsearch/tests/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2f1a68e71ff468b2803f7196ec372bbb64519335c886220eded85925917006a9
|
|
4
|
+
data.tar.gz: d4a039160642905c738025ec977df3f8d5b8d33d34180ab3c75709c1cf308bf2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d446246da04e24d355283e7a7b102b737346376c80e94ec899a98e1d8c209487469bf7b2b028ebfa7893015f739413a33b2ebb3d8c3a3bb8494851532c470f7
|
|
7
|
+
data.tar.gz: fd59fa83bec9baae0ff4037c156a28e819eacd068e0ba67ea35a7dbe0696b22874925c0befcbbd27aaa930dbd72ad1798062e596ccaa6db1eac37a528d795535
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.15.0] - 2026-01-29
|
|
4
|
+
|
|
5
|
+
- Bugfix: refactors response display for boolean responses (ping, exists) when in debug mode.
|
|
6
|
+
- Sets boxes screen size to whole screen.
|
|
7
|
+
|
|
3
8
|
## [0.14.0] - 2026-01-29
|
|
4
9
|
|
|
5
10
|
- Introduces Ruby TTY tools for better debugging when `ENV['DEBUG']` is set and general display improvements.
|
|
@@ -24,18 +24,14 @@ module Elasticsearch
|
|
|
24
24
|
# Functions to print out test results, errors, summary, etc.
|
|
25
25
|
#
|
|
26
26
|
module Printer
|
|
27
|
-
BOX_WIDTH = TTY::Screen.width
|
|
27
|
+
BOX_WIDTH = TTY::Screen.width
|
|
28
28
|
|
|
29
29
|
def print_success
|
|
30
|
-
response = if [true, false].include? @response
|
|
31
|
-
@response
|
|
32
|
-
else
|
|
33
|
-
@response.status
|
|
34
|
-
end
|
|
35
30
|
if quiet?
|
|
36
31
|
print '🟢 '
|
|
37
32
|
else
|
|
38
|
-
|
|
33
|
+
status = boolean_response? ? @response : @response.status
|
|
34
|
+
puts "🟢 \e[33m#{@short_name}\e[0m - #{@action} \e[32mpassed\e[0m [#{status}]"
|
|
39
35
|
end
|
|
40
36
|
end
|
|
41
37
|
|
|
@@ -47,7 +43,7 @@ module Elasticsearch
|
|
|
47
43
|
if quiet?
|
|
48
44
|
print '🔴 '
|
|
49
45
|
else
|
|
50
|
-
puts "🔴 \e[#{
|
|
46
|
+
puts "🔴 \e[33m#{@short_name}\e[0m - #{@action} \e[31mfailed\e[0m"
|
|
51
47
|
end
|
|
52
48
|
message = ["Expected result: #{action}"]
|
|
53
49
|
if defined?(ElasticsearchServerless) &&
|
|
@@ -112,12 +108,22 @@ module Elasticsearch
|
|
|
112
108
|
Test File: #{$test_file}
|
|
113
109
|
Action: #{method}
|
|
114
110
|
Parameters: #{params}
|
|
115
|
-
Response: #{@response.status}
|
|
116
|
-
Response headers: #{@response.headers}
|
|
117
|
-
Response body: #{@response.body}
|
|
118
111
|
MSG
|
|
112
|
+
if boolean_response?
|
|
113
|
+
message << "Response: #{@response}"
|
|
114
|
+
else
|
|
115
|
+
message << "Response: #{@response.status}" \
|
|
116
|
+
"Response headers: #{@response.headers}" \
|
|
117
|
+
"Response body: #{@response.body}"
|
|
118
|
+
end
|
|
119
119
|
print TTY::Box.frame(message, width: BOX_WIDTH, title: { top_left: '[DEBUG]'})
|
|
120
120
|
end
|
|
121
|
+
|
|
122
|
+
private
|
|
123
|
+
|
|
124
|
+
def boolean_response?
|
|
125
|
+
[true, false].include? @response
|
|
126
|
+
end
|
|
121
127
|
end
|
|
122
128
|
end
|
|
123
129
|
end
|