lazylead 0.5.2 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +7 -2
  3. data/.docker/Dockerfile +17 -6
  4. data/.rubocop.yml +102 -1
  5. data/.simplecov +1 -1
  6. data/Guardfile +1 -1
  7. data/Rakefile +6 -3
  8. data/bin/lazylead +3 -1
  9. data/lazylead.gemspec +31 -26
  10. data/lib/lazylead/cc.rb +21 -20
  11. data/lib/lazylead/cli/app.rb +8 -3
  12. data/lib/lazylead/confluence.rb +9 -2
  13. data/lib/lazylead/email.rb +0 -20
  14. data/lib/lazylead/exchange.rb +16 -28
  15. data/lib/lazylead/model.rb +31 -16
  16. data/lib/lazylead/opts.rb +65 -2
  17. data/lib/lazylead/postman.rb +13 -17
  18. data/lib/lazylead/salt.rb +1 -0
  19. data/lib/lazylead/system/jira.rb +30 -6
  20. data/lib/lazylead/task/accuracy/accuracy.rb +10 -14
  21. data/lib/lazylead/task/accuracy/attachment.rb +2 -6
  22. data/lib/lazylead/task/accuracy/logs.rb +9 -5
  23. data/lib/lazylead/task/accuracy/onlyll.rb +147 -0
  24. data/lib/lazylead/task/accuracy/records.rb +1 -1
  25. data/lib/lazylead/task/accuracy/servers.rb +16 -7
  26. data/lib/lazylead/task/accuracy/stacktrace.rb +50 -10
  27. data/lib/lazylead/task/accuracy/testcase.rb +16 -9
  28. data/lib/lazylead/task/assignment.rb +96 -0
  29. data/lib/lazylead/task/fix_version.rb +6 -0
  30. data/lib/lazylead/task/propagate_down.rb +1 -1
  31. data/lib/lazylead/task/svn/diff.rb +77 -0
  32. data/lib/lazylead/task/svn/grep.rb +139 -0
  33. data/lib/lazylead/task/svn/touch.rb +99 -0
  34. data/lib/lazylead/version.rb +1 -1
  35. data/lib/messages/illegal_assignee_change.erb +123 -0
  36. data/lib/messages/illegal_fixversion_change.erb +8 -0
  37. data/lib/messages/only_ll.erb +107 -0
  38. data/lib/messages/svn_diff.erb +110 -0
  39. data/lib/messages/{svn_log.erb → svn_diff_attachment.erb} +19 -9
  40. data/lib/messages/svn_grep.erb +114 -0
  41. data/test/lazylead/cc_test.rb +1 -0
  42. data/test/lazylead/model_test.rb +20 -0
  43. data/test/lazylead/opts_test.rb +47 -0
  44. data/test/lazylead/postman_test.rb +8 -5
  45. data/test/lazylead/smoke_test.rb +13 -0
  46. data/test/lazylead/smtp_test.rb +1 -4
  47. data/test/lazylead/system/jira_test.rb +6 -7
  48. data/test/lazylead/task/accuracy/attachment_test.rb +1 -1
  49. data/test/lazylead/task/accuracy/logs_test.rb +62 -2
  50. data/test/lazylead/task/accuracy/onlyll_test.rb +138 -0
  51. data/test/lazylead/task/accuracy/servers_test.rb +2 -2
  52. data/test/lazylead/task/accuracy/stacktrace_test.rb +227 -0
  53. data/test/lazylead/task/accuracy/testcase_test.rb +39 -0
  54. data/test/lazylead/task/assignment_test.rb +53 -0
  55. data/test/lazylead/task/duedate_test.rb +3 -10
  56. data/test/lazylead/task/fix_version_test.rb +1 -0
  57. data/test/lazylead/task/propagate_down_test.rb +4 -3
  58. data/test/lazylead/task/savepoint_test.rb +9 -6
  59. data/test/lazylead/task/svn/diff_test.rb +97 -0
  60. data/test/lazylead/task/svn/grep_test.rb +103 -0
  61. data/test/lazylead/task/{touch_test.rb → svn/touch_test.rb} +7 -34
  62. data/test/test.rb +7 -8
  63. data/upgrades/sqlite/999.testdata.sql +3 -1
  64. metadata +141 -55
  65. data/lib/lazylead/task/touch.rb +0 -119
@@ -207,6 +207,45 @@ module Lazylead
207
207
  {color:#DE10AA}AR{color}: YYYY"
208
208
  end
209
209
 
210
+ test "tc with colored bold ar er" do
211
+ assert testcase? "*TC:*
212
+ # Step 1
213
+ # Step 2
214
+ # Step ..
215
+ # Step N
216
+ *{color:#00673A}ER{color}* = XXXX
217
+ *{color:#DE10AA}AR{color}* = YYYY"
218
+ end
219
+
220
+ test "tc with ar er in brackets" do
221
+ assert testcase? "*TC Steps:*
222
+ # Step 1
223
+ # Step ..
224
+ # Step N
225
+ *[ER]* = XXXX
226
+ *[AR]* = YYYY"
227
+ end
228
+
229
+ test "tc with ar er in noformat" do
230
+ assert testcase? "*TC Steps:*
231
+ # Step 1
232
+ # Step ..
233
+ # Step N
234
+ {noformat}
235
+ *[ER]* = XXXX
236
+ *[AR]* = YYYY
237
+ {noformat}"
238
+ end
239
+
240
+ test "tc with colored ar er in brackets" do
241
+ assert testcase? "*TC Steps:*
242
+ # Step 1
243
+ # Step ..
244
+ # Step N
245
+ *{color:#00673A}[ER]{color}* = XXXX
246
+ *{color:#DE10AA}[AR]{color}* = YYYY"
247
+ end
248
+
210
249
  # ensure that issue description has a test case, AR and ER
211
250
  def testcase?(desc)
212
251
  Testcase.new.passed(OpenStruct.new(description: desc))
@@ -0,0 +1,53 @@
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 "mail"
26
+
27
+ require_relative "../../test"
28
+ require_relative "../../../lib/lazylead/smtp"
29
+ require_relative "../../../lib/lazylead/opts"
30
+ require_relative "../../../lib/lazylead/postman"
31
+ require_relative "../../../lib/lazylead/task/assignment"
32
+
33
+ module Lazylead
34
+ class AssignmentTest < Lazylead::Test
35
+ test "alert in case assignee changed by not authorized person" do
36
+ Lazylead::Smtp.new.enable
37
+ Task::Assignment.new.run(
38
+ NoAuthJira.new("https://jira.spring.io"),
39
+ Postman.new,
40
+ Opts.new(
41
+ "to" => "lead@company.com",
42
+ "from" => "ll@company.com",
43
+ "jql" => "key in ('DATAJDBC-480') and assignee is not empty",
44
+ "allowed" => "tom,mike,bob",
45
+ "subject" => "Assignment: How dare you?",
46
+ "template" => "lib/messages/illegal_assignee_change.erb"
47
+ )
48
+ )
49
+ assert_email "Assignment: How dare you?",
50
+ %w[DATAJDBC-480 01-Apr-2020 Minor Mark\ Paluch tom,mike,bob EntityInstantiators]
51
+ end
52
+ end
53
+ end
@@ -48,10 +48,7 @@ module Lazylead
48
48
  "template" => "lib/messages/due_date_expired.erb"
49
49
  )
50
50
  )
51
- assert_equal 2,
52
- Mail::TestMailer.deliveries
53
- .filter { |m| m.subject.eql? "[DD] PDTN!" }
54
- .length
51
+ assert_equal(2, Mail::TestMailer.deliveries.count { |m| m.subject.eql? "[DD] PDTN!" })
55
52
  end
56
53
 
57
54
  test "configuration properties merged successfully" do
@@ -123,8 +120,7 @@ module Lazylead
123
120
  )
124
121
  assert_equal %w[another.boss@example.com mom@home.com],
125
122
  Mail::TestMailer.deliveries
126
- .filter { |m| m.subject.eql? "CC: Watching" }
127
- .first.cc
123
+ .find { |m| m.subject.eql? "CC: Watching" }.cc
128
124
  end
129
125
 
130
126
  test "reporter got alert about his/her tickets with expired DD" do
@@ -139,10 +135,7 @@ module Lazylead
139
135
  "template" => "lib/messages/due_date_expired.erb"
140
136
  )
141
137
  )
142
- assert_equal 2,
143
- Mail::TestMailer.deliveries
144
- .filter { |m| m.subject.eql? "DD Expired!" }
145
- .length
138
+ assert_equal(2, Mail::TestMailer.deliveries.count { |m| m.subject.eql? "DD Expired!" })
146
139
  end
147
140
  end
148
141
  end
@@ -42,6 +42,7 @@ module Lazylead
42
42
  "from" => "ll@company.com",
43
43
  "jql" => "key in ('DATAJDBC-480') and fixVersion is not empty",
44
44
  "allowed" => "tom,mike,bob",
45
+ "fields" => "description,reporter,priority,summary,created,fixVersions",
45
46
  "subject" => "FixVersion: How dare you?",
46
47
  "template" => "lib/messages/illegal_fixversion_change.erb"
47
48
  )
@@ -28,6 +28,7 @@ require_relative "../../../lib/lazylead/task/propagate_down"
28
28
 
29
29
  module Lazylead
30
30
  class PropagateDownTest < Lazylead::Test
31
+ # rubocop:disable Naming/VariableNumber
31
32
  test "propagate fields from parent ticket to sub-tasks" do
32
33
  parent = OpenStruct.new(
33
34
  id: 1,
@@ -38,7 +39,7 @@ module Lazylead
38
39
  customfield_102: "Yesterday"
39
40
  }.stringify_keys
40
41
  )
41
- Child = Struct.new(:id, :key, :fields, :comment) do
42
+ child = Struct.new(:id, :key, :fields, :comment) do
42
43
  def save(diff)
43
44
  fields.merge! diff[:fields]
44
45
  end
@@ -54,8 +55,7 @@ module Lazylead
54
55
  def save!(body)
55
56
  self[:comment] = body[:body]
56
57
  end
57
- end
58
- child = Child.new(
58
+ end.new(
59
59
  2, "PRJ-2",
60
60
  {
61
61
  subtasks: [],
@@ -84,5 +84,6 @@ module Lazylead
84
84
  |customfield_102|Yesterday|],
85
85
  child.comment
86
86
  end
87
+ # rubocop:enable Naming/VariableNumber
87
88
  end
88
89
  end
@@ -24,6 +24,7 @@
24
24
 
25
25
  require_relative "../../test"
26
26
  require_relative "../../../lib/lazylead/smtp"
27
+ require_relative "../../../lib/lazylead/opts"
27
28
  require_relative "../../../lib/lazylead/postman"
28
29
  require_relative "../../../lib/lazylead/task/savepoint"
29
30
 
@@ -36,15 +37,17 @@ module Lazylead
36
37
  Task::Savepoint.new.run(
37
38
  [],
38
39
  Postman.new,
39
- "from" => "fake@email.com",
40
- "subject" => "[LL] Configuration backup",
41
- "template" => "lib/messages/savepoint.erb",
42
- "to" => "big.boss@example.com"
40
+ Opts.new(
41
+ "from" => "fake@email.com",
42
+ "subject" => "[LL] Configuration backup",
43
+ "template" => "lib/messages/savepoint.erb",
44
+ "to" => "big.boss@example.com"
45
+ )
43
46
  )
44
47
  assert_equal 'text/markdown; filename="readme.md"',
45
48
  Mail::TestMailer.deliveries
46
- .filter { |m| m.subject.eql? "[LL] Configuration backup" }
47
- .first.attachments.first.header.fields[0]
49
+ .find { |m| m.subject.eql? "[LL] Configuration backup" }
50
+ .attachments.first.header.fields[0]
48
51
  .unparsed_value
49
52
  end
50
53
  end
@@ -0,0 +1,97 @@
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 "mail"
26
+ require_relative "../../../test"
27
+ require_relative "../../../../lib/lazylead/smtp"
28
+ require_relative "../../../../lib/lazylead/opts"
29
+ require_relative "../../../../lib/lazylead/postman"
30
+ require_relative "../../../../lib/lazylead/task/svn/diff"
31
+
32
+ module Lazylead
33
+ class DiffTest < Lazylead::Test
34
+ test "changes since revision" do
35
+ skip "No svn credentials provided" unless env? "svn_log_user",
36
+ "svn_log_password"
37
+ skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"
38
+ Lazylead::Smtp.new.enable
39
+ Task::Svn::Diff.new.run(
40
+ [],
41
+ Postman.new,
42
+ Opts.new(
43
+ "from" => "svnlog@test.com",
44
+ "svn_url" => "https://svn.riouxsvn.com/touch4ll",
45
+ "svn_user" => ENV["svn_log_user"],
46
+ "svn_password" => ENV["svn_log_password"],
47
+ "commit_url" => "https://view.commit.com?rev=",
48
+ "user" => "https://user.com?id=",
49
+ "to" => "lead@fake.com",
50
+ "since_rev" => "1",
51
+ "subject" => "[SVN] Changed since rev1",
52
+ "template" => "lib/messages/svn_diff.erb",
53
+ "template-attachment" => "lib/messages/svn_diff_attachment.erb"
54
+ )
55
+ )
56
+ assert_email_line "[SVN] Changed since rev1",
57
+ %w[r2 by dgroup at 2020-08-16]
58
+ end
59
+
60
+ test "changes since revision with attachment" do
61
+ skip "No svn credentials provided" unless env? "svn_log_user",
62
+ "svn_log_password"
63
+ skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"
64
+ skip "No postman credentials provided" unless env? "LL_SMTP_HOST",
65
+ "LL_SMTP_PORT",
66
+ "LL_SMTP_USER",
67
+ "LL_SMTP_PASS",
68
+ "LL_SMTP_TO",
69
+ "LL_SMTP_FROM"
70
+ Lazylead::Smtp.new(
71
+ Log.new,
72
+ NoSalt.new,
73
+ smtp_host: ENV["LL_SMTP_HOST"],
74
+ smtp_port: ENV["LL_SMTP_PORT"],
75
+ smtp_user: ENV["LL_SMTP_USER"],
76
+ smtp_pass: ENV["LL_SMTP_PASS"]
77
+ ).enable
78
+ Task::Svn::Diff.new.run(
79
+ [],
80
+ Postman.new,
81
+ Opts.new(
82
+ "from" => ENV["LL_SMTP_FROM"],
83
+ "svn_url" => "https://svn.riouxsvn.com/touch4ll",
84
+ "svn_user" => ENV["svn_log_user"],
85
+ "svn_password" => ENV["svn_log_password"],
86
+ "commit_url" => "https://view.commit.com?rev=",
87
+ "user" => "https://user.com?id=",
88
+ "to" => ENV["LL_SMTP_TO"],
89
+ "since_rev" => "1",
90
+ "subject" => "[SVN] Changed since rev1",
91
+ "template" => "lib/messages/svn_diff.erb",
92
+ "template-attachment" => "lib/messages/svn_diff_attachment.erb"
93
+ )
94
+ )
95
+ end
96
+ end
97
+ end
@@ -0,0 +1,103 @@
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 "mail"
26
+ require_relative "../../../test"
27
+ require_relative "../../../../lib/lazylead/smtp"
28
+ require_relative "../../../../lib/lazylead/opts"
29
+ require_relative "../../../../lib/lazylead/postman"
30
+ require_relative "../../../../lib/lazylead/task/svn/grep"
31
+
32
+ module Lazylead
33
+ class GrepTest < Lazylead::Test
34
+ test "changes with text" do
35
+ skip "No svn credentials provided" unless env? "svn_log_user",
36
+ "svn_log_password"
37
+ skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"
38
+ Lazylead::Smtp.new.enable
39
+ Task::Svn::Grep.new.run(
40
+ [],
41
+ Postman.new,
42
+ Opts.new(
43
+ "from" => "svnlog@test.com",
44
+ "text" => "ping",
45
+ "svn_url" => "https://svn.riouxsvn.com/touch4ll",
46
+ "svn_user" => ENV["svn_log_user"],
47
+ "svn_password" => ENV["svn_log_password"],
48
+ "commit_url" => "https://view.commit.com?rev=",
49
+ "user" => "https://user.com?id=",
50
+ "to" => "lead@fake.com",
51
+ "now" => "2020-08-17T00:00:00+01:00",
52
+ "period" => "864000",
53
+ "subject" => "[SVN] Changes with text",
54
+ "template" => "lib/messages/svn_grep.erb"
55
+ )
56
+ )
57
+ assert_email_line "[SVN] Changes with text",
58
+ %w[r2 by dgroup at 2020-08-16]
59
+ end
60
+
61
+ test "test" do
62
+ diff = <<~MSG
63
+
64
+ r3 | dgroup | 2020-08-16 11:27:01 +0300 (Sun, 16 Aug 2020) | 1 line
65
+
66
+ Add description for 189 issue
67
+
68
+ Index: 189.md
69
+ ===================================================================
70
+ --- 189.md (nonexistent)
71
+ +++ 189.md (revision 3)
72
+ @@ -0,0 +1,9 @@
73
+ +*Issue 189*
74
+ +https://github.com/dgroup/lazylead/issues/189
75
+ +
76
+ +Find stable svn repo which can be used for stable test, for
77
+ +now only floating repo used for testing locally. Also, create a new
78
+ +method "ping" which can be used during tests like
79
+ +```ruby
80
+ +skip "No connection available to svn repo" unless ping("https://riouxsvn.com")
81
+ +```
82
+
83
+ Index: readme.md
84
+ ===================================================================
85
+ --- readme.md (revision 2)
86
+ +++ readme.md (revision 3)
87
+ @@ -3,4 +3,5 @@
88
+ More
89
+ - https://github.com/dgroup/lazylead
90
+ - https://github.com/dgroup/lazylead/blob/master/lib/lazylead/task/touch.rb
91
+ - - https://github.com/dgroup/lazylead/blob/master/test/lazylead/task/touch_test.rb
92
+
93
+ + - https://github.com/dgroup/lazylead/blob/master/test/lazylead/task/touch_test.rb
94
+ +
95
+
96
+
97
+
98
+ MSG
99
+ assert_equal 15, Entry.new(diff).diff(%w[ping]).size,
100
+ "There is one commit with 'ping' word where diff has 14 lines"
101
+ end
102
+ end
103
+ end
@@ -23,20 +23,20 @@
23
23
  # OR OTHER DEALINGS IN THE SOFTWARE.
24
24
 
25
25
  require "mail"
26
- require_relative "../../test"
27
- require_relative "../../../lib/lazylead/smtp"
28
- require_relative "../../../lib/lazylead/opts"
29
- require_relative "../../../lib/lazylead/postman"
30
- require_relative "../../../lib/lazylead/task/touch"
26
+ require_relative "../../../test"
27
+ require_relative "../../../../lib/lazylead/smtp"
28
+ require_relative "../../../../lib/lazylead/opts"
29
+ require_relative "../../../../lib/lazylead/postman"
30
+ require_relative "../../../../lib/lazylead/task/svn/touch"
31
31
 
32
32
  module Lazylead
33
- class SvnTouchTest < Lazylead::Test
33
+ class TouchTest < Lazylead::Test
34
34
  test "important files changed in svn repo" do
35
35
  skip "No svn credentials provided" unless env? "svn_touch_user",
36
36
  "svn_touch_password"
37
37
  skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"
38
38
  Lazylead::Smtp.new.enable
39
- Task::SvnTouch.new.run(
39
+ Task::Svn::Touch.new.run(
40
40
  [],
41
41
  Postman.new,
42
42
  Opts.new(
@@ -58,31 +58,4 @@ module Lazylead
58
58
  %w[3 dgroup /189.md Add\ description\ for\ 189\ issue]
59
59
  end
60
60
  end
61
-
62
- class SvnLogTest < Lazylead::Test
63
- test "changes since revision" do
64
- skip "No svn credentials provided" unless env? "svn_log_user",
65
- "svn_log_password"
66
- skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"
67
- Lazylead::Smtp.new.enable
68
- Task::SvnLog.new.run(
69
- [],
70
- Postman.new,
71
- Opts.new(
72
- "from" => "svnlog@test.com",
73
- "svn_url" => "https://svn.riouxsvn.com/touch4ll",
74
- "svn_user" => ENV["svn_log_user"],
75
- "svn_password" => ENV["svn_log_password"],
76
- "commit_url" => "https://view.commit.com?rev=",
77
- "user" => "https://user.com?id=",
78
- "to" => "lead@fake.com",
79
- "since_rev" => "1",
80
- "subject" => "[SVN] Changed since rev1",
81
- "template" => "lib/messages/svn_log.erb"
82
- )
83
- )
84
- assert_email_line "[SVN] Changed since rev1",
85
- %w[r2 by dgroup at 2020-08-16]
86
- end
87
- end
88
61
  end