lazylead 0.4.1 → 0.5.2
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/.docs/accuracy.md +2 -2
- data/.docs/duedate_expired.md +3 -3
- data/.docs/propagate_down.md +3 -3
- data/.gitattributes +1 -0
- data/.github/dependabot.yml +6 -0
- data/Rakefile +6 -3
- data/bin/lazylead +7 -5
- data/lazylead.gemspec +4 -3
- data/lib/lazylead/cli/app.rb +5 -2
- data/lib/lazylead/exchange.rb +15 -9
- data/lib/lazylead/log.rb +2 -1
- data/lib/lazylead/model.rb +36 -2
- data/lib/lazylead/opts.rb +13 -1
- data/lib/lazylead/postman.rb +9 -4
- data/lib/lazylead/schedule.rb +16 -15
- data/lib/lazylead/smtp.rb +3 -1
- data/lib/lazylead/system/jira.rb +44 -0
- data/lib/lazylead/task/accuracy/accuracy.rb +13 -8
- data/lib/lazylead/task/accuracy/affected_build.rb +2 -6
- data/lib/lazylead/task/accuracy/attachment.rb +44 -0
- data/lib/lazylead/task/accuracy/environment.rb +39 -0
- data/lib/lazylead/task/accuracy/logs.rb +40 -0
- data/lib/lazylead/task/accuracy/records.rb +45 -0
- data/lib/lazylead/task/accuracy/requirement.rb +9 -0
- data/lib/lazylead/task/accuracy/servers.rb +50 -0
- data/lib/lazylead/task/accuracy/stacktrace.rb +63 -0
- data/lib/lazylead/task/accuracy/testcase.rb +85 -0
- data/lib/lazylead/task/accuracy/wiki.rb +41 -0
- data/lib/lazylead/task/echo.rb +18 -0
- data/lib/lazylead/task/fix_version.rb +9 -2
- data/lib/lazylead/task/touch.rb +28 -11
- data/lib/lazylead/version.rb +1 -1
- data/lib/messages/svn_log.erb +117 -0
- data/lib/messages/svn_touch.erb +1 -1
- data/license.txt +1 -1
- data/readme.md +5 -5
- data/test/lazylead/cli/app_test.rb +11 -11
- data/test/lazylead/opts_test.rb +4 -0
- data/test/lazylead/system/jira_test.rb +38 -0
- data/test/lazylead/task/accuracy/accuracy_test.rb +1 -1
- data/test/lazylead/task/accuracy/affected_build_test.rb +2 -2
- data/test/lazylead/task/accuracy/attachment_test.rb +50 -0
- data/test/lazylead/task/accuracy/environment_test.rb +42 -0
- data/test/lazylead/task/accuracy/logs_test.rb +78 -0
- data/test/lazylead/task/accuracy/records_test.rb +60 -0
- data/test/lazylead/task/accuracy/score_test.rb +46 -0
- data/test/lazylead/task/accuracy/servers_test.rb +66 -0
- data/test/lazylead/task/accuracy/stacktrace_test.rb +113 -0
- data/test/lazylead/task/accuracy/testcase_test.rb +215 -0
- data/test/lazylead/task/accuracy/wiki_test.rb +40 -0
- data/test/lazylead/task/touch_test.rb +48 -23
- data/test/test.rb +25 -0
- data/upgrades/sqlite/001-install-main-lazylead-tables.sql +1 -5
- data/upgrades/sqlite/999.testdata.sql +12 -17
- metadata +59 -18
- data/.travis.yml +0 -16
data/test/lazylead/opts_test.rb
CHANGED
@@ -148,5 +148,43 @@ module Lazylead
|
|
148
148
|
.issues("key in (DATAJDBC-480, DATAJDBC-500)", max_results: "1")
|
149
149
|
.size
|
150
150
|
end
|
151
|
+
|
152
|
+
test "description is correct" do
|
153
|
+
assert_words %w[DATACMNS-1639\ moved\ entity\ instantiators],
|
154
|
+
NoAuthJira.new("https://jira.spring.io")
|
155
|
+
.issues("key=DATAJDBC-480")
|
156
|
+
.first
|
157
|
+
.description
|
158
|
+
end
|
159
|
+
|
160
|
+
test "component is correct" do
|
161
|
+
assert_equal %w[Stream\ Module],
|
162
|
+
NoAuthJira.new("https://jira.spring.io")
|
163
|
+
.issues("key=XD-3766")
|
164
|
+
.first
|
165
|
+
.components
|
166
|
+
end
|
167
|
+
|
168
|
+
test "field found" do
|
169
|
+
assert_includes NoAuthJira.new("https://jira.spring.io")
|
170
|
+
.issues("key=DATAJDBC-480")
|
171
|
+
.first["description"],
|
172
|
+
"DATACMNS-1639 moved "
|
173
|
+
end
|
174
|
+
|
175
|
+
test "field not found" do
|
176
|
+
assert NoAuthJira.new("https://jira.spring.io")
|
177
|
+
.issues("key=DATAJDBC-480")
|
178
|
+
.first["absent field"]
|
179
|
+
.blank?
|
180
|
+
end
|
181
|
+
|
182
|
+
test "labels found" do
|
183
|
+
assert_includes NoAuthJira.new("https://jira.spring.io")
|
184
|
+
.issues("key=XD-3766")
|
185
|
+
.first
|
186
|
+
.labels,
|
187
|
+
"Spring"
|
188
|
+
end
|
151
189
|
end
|
152
190
|
end
|
@@ -28,13 +28,13 @@ require_relative "../../../../lib/lazylead/task/accuracy/affected_build"
|
|
28
28
|
module Lazylead
|
29
29
|
class AffectedBuildTest < Lazylead::Test
|
30
30
|
test "affected version absent" do
|
31
|
-
refute
|
31
|
+
refute AffectedBuild.new.passed(
|
32
32
|
OpenStruct.new(fields: { "versions" => [] })
|
33
33
|
)
|
34
34
|
end
|
35
35
|
|
36
36
|
test "affected version provided" do
|
37
|
-
assert
|
37
|
+
assert AffectedBuild.new.passed(
|
38
38
|
OpenStruct.new(fields: { "versions" => ["0.4.0"] })
|
39
39
|
)
|
40
40
|
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2020 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require_relative "../../../test"
|
26
|
+
require_relative "../../../../lib/lazylead/log"
|
27
|
+
require_relative "../../../../lib/lazylead/system/jira"
|
28
|
+
require_relative "../../../../lib/lazylead/task/accuracy/attachment"
|
29
|
+
|
30
|
+
module Lazylead
|
31
|
+
class AttachmentTest < Lazylead::Test
|
32
|
+
class Txt < Attachment
|
33
|
+
def initialize
|
34
|
+
super "", 0, ""
|
35
|
+
end
|
36
|
+
|
37
|
+
def matching(attach)
|
38
|
+
"ConfigServerLogWithException.txt".eql? attach.attrs["filename"]
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
test "attachment is present" do
|
43
|
+
assert Txt.new.passed(
|
44
|
+
NoAuthJira.new("https://jira.spring.io")
|
45
|
+
.issues("key=XD-3761", fields: ["attachment"])
|
46
|
+
.first
|
47
|
+
)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2020 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require_relative "../../../test"
|
26
|
+
require_relative "../../../../lib/lazylead/task/accuracy/environment"
|
27
|
+
|
28
|
+
module Lazylead
|
29
|
+
class EnvironmentTest < Lazylead::Test
|
30
|
+
test "environment absent" do
|
31
|
+
refute Environment.new.passed(
|
32
|
+
OpenStruct.new(fields: { "environment" => "" })
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
test "environment provided" do
|
37
|
+
assert Environment.new.passed(
|
38
|
+
OpenStruct.new(fields: { "environment" => "http://host:port" })
|
39
|
+
)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2020 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require_relative "../../../test"
|
26
|
+
require_relative "../../../../lib/lazylead/task/accuracy/logs"
|
27
|
+
|
28
|
+
module Lazylead
|
29
|
+
class LogsTest < Lazylead::Test
|
30
|
+
test "log file is present" do
|
31
|
+
assert Logs.new.passed(
|
32
|
+
OpenStruct.new(
|
33
|
+
attachments: [
|
34
|
+
OpenStruct.new(
|
35
|
+
attrs: { "size" => 10_241, "filename" => "catalina.log" }
|
36
|
+
)
|
37
|
+
]
|
38
|
+
)
|
39
|
+
)
|
40
|
+
end
|
41
|
+
|
42
|
+
test "log file is present but name in uppercase" do
|
43
|
+
assert Logs.new.passed(
|
44
|
+
OpenStruct.new(
|
45
|
+
attachments: [
|
46
|
+
OpenStruct.new(
|
47
|
+
attrs: { "size" => 10_241, "filename" => "catalina.LOG" }
|
48
|
+
)
|
49
|
+
]
|
50
|
+
)
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
test "attachment isn't a log file" do
|
55
|
+
refute Logs.new.passed(
|
56
|
+
OpenStruct.new(
|
57
|
+
attachments: [
|
58
|
+
OpenStruct.new(
|
59
|
+
attrs: { "size" => 10_001, "filename" => "readme.md" }
|
60
|
+
)
|
61
|
+
]
|
62
|
+
)
|
63
|
+
)
|
64
|
+
end
|
65
|
+
|
66
|
+
test "log file size less than 10KB" do
|
67
|
+
refute Logs.new.passed(
|
68
|
+
OpenStruct.new(
|
69
|
+
attachments: [
|
70
|
+
OpenStruct.new(
|
71
|
+
attrs: { "size" => 10_000, "filename" => "catalina.log" }
|
72
|
+
)
|
73
|
+
]
|
74
|
+
)
|
75
|
+
)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2020 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require_relative "../../../test"
|
26
|
+
require_relative "../../../../lib/lazylead/task/accuracy/records"
|
27
|
+
|
28
|
+
module Lazylead
|
29
|
+
class RecordsTest < Lazylead::Test
|
30
|
+
test "file has .mp4 extension" do
|
31
|
+
assert Records.new.passed(
|
32
|
+
OpenStruct.new(
|
33
|
+
attachments: [
|
34
|
+
OpenStruct.new(attrs: { "filename" => "failed case 1.mp4" })
|
35
|
+
]
|
36
|
+
)
|
37
|
+
)
|
38
|
+
end
|
39
|
+
|
40
|
+
test "file has .avi extension" do
|
41
|
+
assert Records.new.passed(
|
42
|
+
OpenStruct.new(
|
43
|
+
attachments: [
|
44
|
+
OpenStruct.new(attrs: { "filename" => "failed case 2.avi" })
|
45
|
+
]
|
46
|
+
)
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
test "file has .txt extension" do
|
51
|
+
refute Records.new.passed(
|
52
|
+
OpenStruct.new(
|
53
|
+
attachments: [
|
54
|
+
OpenStruct.new(attrs: { "filename" => "failed case 2.txt" })
|
55
|
+
]
|
56
|
+
)
|
57
|
+
)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2020 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require_relative "../../../test"
|
26
|
+
require_relative "../../../../lib/lazylead/task/accuracy/accuracy"
|
27
|
+
|
28
|
+
module Lazylead
|
29
|
+
class ScoreTest < Lazylead::Test
|
30
|
+
test "grade is detected" do
|
31
|
+
{
|
32
|
+
"7": "0",
|
33
|
+
"5.5": "0",
|
34
|
+
"12": "10",
|
35
|
+
"21.5": "20",
|
36
|
+
"25.5": "20",
|
37
|
+
"57": "50",
|
38
|
+
"98": "90",
|
39
|
+
"100": "100"
|
40
|
+
}.each do |k, v|
|
41
|
+
assert_equal v.to_f,
|
42
|
+
Lazylead::Score.new({}, {}, {}).grade(k.to_s.to_f)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2020 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require_relative "../../../test"
|
26
|
+
require_relative "../../../../lib/lazylead/task/accuracy/servers"
|
27
|
+
|
28
|
+
module Lazylead
|
29
|
+
class ServersTest < Lazylead::Test
|
30
|
+
class Task
|
31
|
+
def initialize(desc)
|
32
|
+
@desc = desc
|
33
|
+
end
|
34
|
+
|
35
|
+
def [](_)
|
36
|
+
""
|
37
|
+
end
|
38
|
+
|
39
|
+
def description
|
40
|
+
@desc
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
test "url to failed entity found in description" do
|
45
|
+
assert Servers.new(envs: [%r{(http|https):\/\/\w+\:\d+\/.{10,}}]).passed(
|
46
|
+
Task.new(
|
47
|
+
"1. Open the dedicated app
|
48
|
+
2. Click on https://server:6900/object?id=2000
|
49
|
+
ER: Object has no failed status
|
50
|
+
AR: Object has failed status"
|
51
|
+
)
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
test "url to failed entity not present in description" do
|
56
|
+
refute Servers.new(envs: [%r{(http|https):\/\/\w+\:\d+\/.{10,}}]).passed(
|
57
|
+
Task.new(
|
58
|
+
"1. Open the dedicated app
|
59
|
+
2. Click on https://server:6900/
|
60
|
+
ER: Object has no failed status
|
61
|
+
AR: Object has failed status"
|
62
|
+
)
|
63
|
+
)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The MIT License
|
4
|
+
#
|
5
|
+
# Copyright (c) 2019-2020 Yurii Dubinka
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"),
|
9
|
+
# to deal in the Software without restriction, including without limitation
|
10
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
11
|
+
# and/or sell copies of the Software, and to permit persons to whom
|
12
|
+
# the Software is furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included
|
15
|
+
# in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
22
|
+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
23
|
+
# OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
require_relative "../../../test"
|
26
|
+
require_relative "../../../../lib/lazylead/task/accuracy/stacktrace"
|
27
|
+
|
28
|
+
module Lazylead
|
29
|
+
class StacktraceTest < Lazylead::Test
|
30
|
+
test "java stacktrace is found" do
|
31
|
+
assert Stacktrace.new.passed(
|
32
|
+
OpenStruct.new(
|
33
|
+
description: "
|
34
|
+
XXXXXX env: http://xxxx.xxx.com:00000/
|
35
|
+
WL log [^clust1.log]
|
36
|
+
http://xxx.xxx.com/display/xxx/SQLException+No+more+data+to+read+from+socket
|
37
|
+
|
38
|
+
During call we found in clust1.log the following error
|
39
|
+
{noformat}
|
40
|
+
at xxx.xxx.xxx.xxx.wrapper.XxxXxxXxxxXxx.xxxxXxxxXxxx(XxxXxxXxxxXxx.java:233)
|
41
|
+
at xxx.xxx.xxx.xxx.wrapper.XxxXxxXxxxXxx.xxxxXxxxXxxx(XxxXxxXxxxXxx.java:343)
|
42
|
+
... 318 more
|
43
|
+
Caused by: javax.transaction.TransactionRolledbackException: EJB Exception: ; nested exception is:
|
44
|
+
javax.ejb.TransactionRolledbackLocalException: EJB Exception:
|
45
|
+
at weblogic.utils.StackTraceDisabled.unknownMethod()
|
46
|
+
Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception:
|
47
|
+
... 1 more
|
48
|
+
Caused by: javax.ejb.EJBException: java.sql.SQLRecoverableException: No more data to read from socket
|
49
|
+
... 1 more
|
50
|
+
Caused by: java.sql.SQLRecoverableException: No more data to read from socket
|
51
|
+
... 1 more
|
52
|
+
{noformat}
|
53
|
+
|
54
|
+
The investigation is required.
|
55
|
+
More details here: XXXXX-xxxxxx"
|
56
|
+
)
|
57
|
+
)
|
58
|
+
end
|
59
|
+
|
60
|
+
test "stacktrace is found" do
|
61
|
+
assert Stacktrace.new.passed(
|
62
|
+
OpenStruct.new(
|
63
|
+
description: "
|
64
|
+
Stack Trace
|
65
|
+
{noformat}
|
66
|
+
javax.transaction.TransactionRolledbackException: EJB Exception: ; nested exception is:
|
67
|
+
java.lang.IllegalArgumentException: Unknown xxxx-xxx xxx \"xxx.xxx.xxx.configuration\"
|
68
|
+
at weblogic.ejb.container.internal.EJBRuntimeUtils.asTxRollbackException(EJBRuntimeUtils.java:134)
|
69
|
+
at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemException(BaseRemoteObject.java:595)
|
70
|
+
at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemException(BaseRemoteObject.java:537)
|
71
|
+
at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:365)
|
72
|
+
at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:20)
|
73
|
+
at weblogic.ejb.container.internal.BaseRemoteObject.__WL_postInvokeTxRetry(BaseRemoteObject.java:307)
|
74
|
+
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invokeInternal(SessionRemoteMethodInvoker.java:67)
|
75
|
+
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:21)
|
76
|
+
at xxx.xxxx.xxxxxx.xxx.xxx.XxxxXxxxXxxxXxxxxxx.xxxxXxxxXXxxxx(Unknown Source)
|
77
|
+
at xxxx.xxxxxx.xxxxx.xxx.xxxxxx.xxx.xxxxxxxx.xxxx.xxxxxx.XxxxxXxxxx.xxxXxxxXxxxx(XxxxXxxxXxxx.java:677)
|
78
|
+
at xxxx.xxxxxx.xxxxx.xxx.xxxxxx.xxx.xxxxxxxx.xxxx.xxxxxx.XxxxxXxxxx.xxxXxxxXxxxx(XxxxXxxxXxxx.java:304)
|
79
|
+
at xxxx.xxxxxx.xxxxx.xxx.xxxxxx.xxx.xxxxxxxx.xxxx.xxxxxx.XxxxxXxxxx.xxxXxxxXxxxx(XxxxXxxxXxxx.java:75)
|
80
|
+
at xxxx.xxxxxx.xxxxx.xxx.xxxxxx.xxx.xxxxxxxx.xxxx.xxxxxx.XxxxxXxxxx.xxxXxxxXxxxx(XxxxXxxxXxxx.java:138)
|
81
|
+
at sun.reflect.GeneratedMethodAccessor2010.invoke(Unknown Source)
|
82
|
+
{noformat}
|
83
|
+
|
84
|
+
Log file - [^clust3.log]
|
85
|
+
|
86
|
+
Path to log file
|
87
|
+
{noformat}
|
88
|
+
\\ftp.server.com\\logs.tgz
|
89
|
+
{noformat}
|
90
|
+
|
91
|
+
Server link - http://xxxxxXxxXxxx:0000
|
92
|
+
|
93
|
+
!214.png|thumbnail!"
|
94
|
+
)
|
95
|
+
)
|
96
|
+
end
|
97
|
+
|
98
|
+
test "ORA error is found" do
|
99
|
+
assert Stacktrace.new.passed(
|
100
|
+
OpenStruct.new(
|
101
|
+
description: "
|
102
|
+
{noformat}
|
103
|
+
@XXXX/xxx/xxx/xxxx_xxx_xxxxx_xxx_xx.sql
|
104
|
+
ORA-02291: 1 integrity constraint (XXX_XXX_XXX.XX_xxx) violated - xx xxx not found for xx_xx=xx xxxxx_xx=XXXXXXX xxxxx=XXXXXXXX xxx_xx=xxx xx_xxx=xxxx.xxx.xxx.xxxxx.xxx.xxx.xxxxx
|
105
|
+
XXXX-xxx-xxxx: xxxxx xxxxx Xxxxx xxxx Xxxx
|
106
|
+
{noformat}
|
107
|
+
|
108
|
+
XXXX - XXX_XXX.X.XXXX.XXXX.XXXX.XxxxxxXX.X_xxxXXXXXX"
|
109
|
+
)
|
110
|
+
)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|