lazylead 0.11.4 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.0pdd.yml +3 -0
- data/.circleci/config.yml +0 -12
- data/.docs/accuracy.sql +35 -0
- data/.github/workflows/build.yml +39 -0
- data/.github/workflows/release.yml +15 -0
- data/.rubocop.yml +11 -2
- data/.rultor.yml +2 -2
- data/Gemfile +1 -1
- data/Rakefile +17 -9
- data/bin/lazylead +5 -5
- data/lazylead.gemspec +22 -25
- data/lib/lazylead/allocated.rb +1 -1
- data/lib/lazylead/cc.rb +1 -1
- data/lib/lazylead/cli/app.rb +3 -3
- data/lib/lazylead/confluence.rb +4 -3
- data/lib/lazylead/email.rb +1 -1
- data/lib/lazylead/exchange.rb +3 -3
- data/lib/lazylead/home.rb +2 -2
- data/lib/lazylead/log.rb +1 -1
- data/lib/lazylead/model.rb +4 -3
- data/lib/lazylead/opts.rb +1 -1
- data/lib/lazylead/os.rb +2 -1
- data/lib/lazylead/postman.rb +8 -7
- data/lib/lazylead/requires.rb +1 -1
- data/lib/lazylead/salt.rb +1 -1
- data/lib/lazylead/schedule.rb +5 -9
- data/lib/lazylead/smtp.rb +1 -1
- data/lib/lazylead/system/empty.rb +1 -1
- data/lib/lazylead/system/fake.rb +1 -1
- data/lib/lazylead/system/jira.rb +5 -3
- data/lib/lazylead/system/synced.rb +1 -1
- data/lib/lazylead/task/accuracy/accuracy.rb +3 -3
- data/lib/lazylead/task/accuracy/affected_build.rb +1 -1
- data/lib/lazylead/task/accuracy/attachment.rb +1 -1
- data/lib/lazylead/task/accuracy/environment.rb +1 -1
- data/lib/lazylead/task/accuracy/has_label.rb +1 -1
- data/lib/lazylead/task/accuracy/logs.rb +1 -1
- data/lib/lazylead/task/accuracy/logs_link.rb +1 -1
- data/lib/lazylead/task/accuracy/memes.rb +1 -1
- data/lib/lazylead/task/accuracy/onlyll.rb +1 -1
- data/lib/lazylead/task/accuracy/records.rb +9 -2
- data/lib/lazylead/task/accuracy/records_link.rb +1 -1
- data/lib/lazylead/task/accuracy/required.rb +1 -1
- data/lib/lazylead/task/accuracy/requirement.rb +1 -1
- data/lib/lazylead/task/accuracy/screenshots.rb +1 -1
- data/lib/lazylead/task/accuracy/servers.rb +1 -1
- data/lib/lazylead/task/accuracy/stacktrace.rb +2 -2
- data/lib/lazylead/task/accuracy/testcase.rb +1 -1
- data/lib/lazylead/task/accuracy/wiki.rb +1 -1
- data/lib/lazylead/task/accuracy/wiki_url.rb +1 -1
- data/lib/lazylead/task/alert/alert.rb +1 -1
- data/lib/lazylead/task/alert/alertif.rb +1 -1
- data/lib/lazylead/task/alert/changed_to.rb +1 -1
- data/lib/lazylead/task/assignment.rb +1 -1
- data/lib/lazylead/task/confluence_ref.rb +1 -1
- data/lib/lazylead/task/echo.rb +2 -2
- data/lib/lazylead/task/fix_version.rb +1 -1
- data/lib/lazylead/task/git/git.rb +82 -0
- data/lib/lazylead/task/loading.rb +2 -3
- data/lib/lazylead/task/micromanager.rb +1 -1
- data/lib/lazylead/task/missing_comment.rb +1 -1
- data/lib/lazylead/task/propagate_down.rb +3 -3
- data/lib/lazylead/task/savepoint.rb +1 -1
- data/lib/lazylead/task/svn/diff.rb +1 -1
- data/lib/lazylead/task/svn/grep.rb +1 -1
- data/lib/lazylead/task/svn/svn.rb +1 -1
- data/lib/lazylead/task/svn/touch.rb +42 -14
- data/lib/lazylead/version.rb +2 -2
- data/lib/lazylead.rb +1 -1
- data/license.txt +1 -1
- data/readme.md +20 -15
- data/test/lazylead/allocated_test.rb +1 -1
- data/test/lazylead/cc_test.rb +7 -7
- data/test/lazylead/cli/app_test.rb +1 -1
- data/test/lazylead/confluence_test.rb +1 -1
- data/test/lazylead/exchange_test.rb +10 -10
- data/test/lazylead/file_postman_test.rb +47 -0
- data/test/lazylead/model_test.rb +2 -2
- data/test/lazylead/opts_test.rb +1 -1
- data/test/lazylead/postman_test.rb +7 -39
- data/test/lazylead/retry_test.rb +12 -1
- data/test/lazylead/salt_test.rb +1 -1
- data/test/lazylead/smoke_test.rb +2 -2
- data/test/lazylead/smtp_test.rb +7 -7
- data/test/lazylead/stdout_postman_test.rb +48 -0
- data/test/lazylead/system/jira_test.rb +53 -54
- data/test/lazylead/task/accuracy/accuracy_test.rb +11 -11
- data/test/lazylead/task/accuracy/affected_build_test.rb +1 -1
- data/test/lazylead/task/accuracy/attachment_test.rb +4 -4
- data/test/lazylead/task/accuracy/environment_test.rb +1 -1
- data/test/lazylead/task/accuracy/has_label_test.rb +1 -1
- data/test/lazylead/task/accuracy/logs_link_test.rb +1 -1
- data/test/lazylead/task/accuracy/logs_test.rb +1 -1
- data/test/lazylead/task/accuracy/memes_test.rb +1 -1
- data/test/lazylead/task/accuracy/onlyll_test.rb +21 -21
- data/test/lazylead/task/accuracy/records_llink_test.rb +1 -1
- data/test/lazylead/task/accuracy/records_test.rb +35 -12
- data/test/lazylead/task/accuracy/score_test.rb +4 -4
- data/test/lazylead/task/accuracy/screenshots_test.rb +3 -3
- data/test/lazylead/task/accuracy/servers_test.rb +1 -1
- data/test/lazylead/task/accuracy/stacktrace_test.rb +1 -1
- data/test/lazylead/task/accuracy/testcase_test.rb +1 -1
- data/test/lazylead/task/accuracy/wiki_test.rb +1 -1
- data/test/lazylead/task/accuracy/wiki_url_test.rb +1 -1
- data/test/lazylead/task/alert/alertif_test.rb +5 -5
- data/test/lazylead/task/alert/assignee_alert_test.rb +1 -1
- data/test/lazylead/task/alert/changed_to_test.rb +5 -5
- data/test/lazylead/task/assignment_test.rb +5 -5
- data/test/lazylead/task/confluence_ref_test.rb +8 -8
- data/test/lazylead/task/created_recently_test.rb +4 -4
- data/test/lazylead/task/duedate_test.rb +14 -14
- data/test/lazylead/task/echo_test.rb +1 -1
- data/test/lazylead/task/fix_version_test.rb +6 -5
- data/test/lazylead/task/loading_test.rb +7 -7
- data/test/lazylead/task/micromanager_test.rb +5 -5
- data/test/lazylead/task/missing_comment_test.rb +4 -4
- data/test/lazylead/task/propagate_down_test.rb +1 -1
- data/test/lazylead/task/savepoint_test.rb +1 -1
- data/test/lazylead/task/svn/diff_test.rb +14 -15
- data/test/lazylead/task/svn/grep_test.rb +4 -3
- data/test/lazylead/task/svn/touch_test.rb +74 -6
- data/test/lazylead/version_test.rb +1 -1
- data/test/sqlite_test.rb +1 -1
- data/test/test.rb +10 -3
- metadata +49 -107
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -36,20 +36,20 @@ module Lazylead
|
|
36
36
|
test "last change to Done" do
|
37
37
|
Smtp.new.enable
|
38
38
|
Lazylead::Task::AlertIf.new.run(
|
39
|
-
NoAuthJira.new("https://jira.
|
39
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
40
40
|
Postman.new,
|
41
41
|
Opts.new(
|
42
|
-
"to_status" => "
|
42
|
+
"to_status" => "Closed",
|
43
43
|
"to" => "lead@company.com",
|
44
44
|
"from" => "ll@company.com",
|
45
45
|
"rules" => "Lazylead::ToStatus",
|
46
|
-
"jql" => "key=
|
46
|
+
"jql" => "key=JAVA-500",
|
47
47
|
"subject" => "[LL] alert if",
|
48
48
|
"template" => "lib/messages/alertif.erb"
|
49
49
|
)
|
50
50
|
)
|
51
51
|
assert_email "[LL] alert if",
|
52
|
-
"
|
52
|
+
"JAVA-500", "Major - P3", "Closed", "Uladzimir Mihura", "Jeffrey Yemin", "m/r out:db and out:sharded options"
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -30,12 +30,12 @@ require_relative "../../../../lib/lazylead/task/alert/changed_to"
|
|
30
30
|
|
31
31
|
module Lazylead
|
32
32
|
class ToStatusTest < Lazylead::Test
|
33
|
-
test "last change to
|
33
|
+
test "last change to Closed" do
|
34
34
|
assert Lazylead::ToStatus.new.passed(
|
35
|
-
NoAuthJira.new("https://jira.
|
36
|
-
.issues("key=
|
35
|
+
NoAuthJira.new("https://jira.mongodb.org")
|
36
|
+
.issues("key=JAVA-151", Opts.new.jira_defaults.merge(expand: "changelog"))
|
37
37
|
.first,
|
38
|
-
Opts.new("to_status" => "
|
38
|
+
Opts.new("to_status" => "Closed")
|
39
39
|
)
|
40
40
|
end
|
41
41
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -35,20 +35,20 @@ module Lazylead
|
|
35
35
|
test "alert in case assignee changed by not authorized person" do
|
36
36
|
Lazylead::Smtp.new.enable
|
37
37
|
Task::Assignment.new.run(
|
38
|
-
NoAuthJira.new("https://jira.
|
38
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
39
39
|
Postman.new,
|
40
40
|
Opts.new(
|
41
41
|
"to" => "lead@company.com",
|
42
42
|
"from" => "ll@company.com",
|
43
|
-
"jql" => "key
|
43
|
+
"jql" => "key=JAVA-4190",
|
44
44
|
"allowed" => "tom,mike,bob",
|
45
45
|
"subject" => "Assignment: How dare you?",
|
46
46
|
"template" => "lib/messages/illegal_assignee_change.erb"
|
47
47
|
)
|
48
48
|
)
|
49
49
|
assert_email "Assignment: How dare you?",
|
50
|
-
"
|
51
|
-
"
|
50
|
+
"JAVA-4190", "Jeffrey Yemin", "Valentin Kavalenka",
|
51
|
+
"Client side builder for operators supported by $search", "Nihal Jain"
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -47,17 +47,17 @@ module Lazylead
|
|
47
47
|
"JIRA_PASS"
|
48
48
|
Task::ConfluenceRef.new.run(
|
49
49
|
Jira.new(
|
50
|
-
username: ENV
|
51
|
-
password: ENV
|
52
|
-
site: ENV
|
50
|
+
username: ENV.fetch("JIRA_USER", nil),
|
51
|
+
password: ENV.fetch("JIRA_PASS", nil),
|
52
|
+
site: ENV.fetch("JIRA_URL", nil),
|
53
53
|
context_path: ""
|
54
54
|
), "",
|
55
|
-
"jql" => ENV
|
55
|
+
"jql" => ENV.fetch("CONFLUENCE_JQL", nil),
|
56
56
|
"confluences" => [
|
57
57
|
{
|
58
|
-
"url" => ENV
|
59
|
-
"name" => ENV
|
60
|
-
"user" => ENV
|
58
|
+
"url" => ENV.fetch("CONFLUENCE_URL", nil), "app" => ENV.fetch("CONFLUENCE_APP_ID", nil),
|
59
|
+
"name" => ENV.fetch("CONFLUENCE_NAME", nil), "type" => "com.atlassian.confluence",
|
60
|
+
"user" => ENV.fetch("CONFLUENCE_USER", nil), "pass" => ENV.fetch("CONFLUENCE_PASS", nil)
|
61
61
|
}
|
62
62
|
].to_json
|
63
63
|
)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -37,18 +37,18 @@ module Lazylead
|
|
37
37
|
test "issues were fetched" do
|
38
38
|
Smtp.new.enable
|
39
39
|
Task::Alert.new.run(
|
40
|
-
NoAuthJira.new("https://jira.
|
40
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
41
41
|
Postman.new,
|
42
42
|
Opts.new(
|
43
43
|
"from" => "fake@email.com",
|
44
44
|
"to" => "my@team.com",
|
45
|
-
"sql" => "
|
45
|
+
"sql" => "key in (JAVA-4403, JAVA-4417)",
|
46
46
|
"subject" => "[CR] 20min ago!",
|
47
47
|
"template" => "lib/messages/created_recently.erb"
|
48
48
|
)
|
49
49
|
)
|
50
50
|
assert_email "[CR] 20min ago!",
|
51
|
-
"
|
51
|
+
"JAVA-4403", "JAVA-4417"
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -39,16 +39,16 @@ module Lazylead
|
|
39
39
|
test "issues were fetched" do
|
40
40
|
Smtp.new.enable
|
41
41
|
Task::AssigneeAlert.new.run(
|
42
|
-
NoAuthJira.new("https://jira.
|
42
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
43
43
|
Postman.new,
|
44
44
|
Opts.new(
|
45
45
|
"from" => "fake@email.com",
|
46
|
-
"sql" => "
|
46
|
+
"sql" => "key in (JAVA-151,JAVA-469,JAVA-468,JAVA-500)",
|
47
47
|
"subject" => "[DD] PDTN!",
|
48
48
|
"template" => "lib/messages/due_date_expired.erb"
|
49
49
|
)
|
50
50
|
)
|
51
|
-
|
51
|
+
greater_or_eq(1, Mail::TestMailer.deliveries.count { |m| m.subject.eql? "[DD] PDTN!" })
|
52
52
|
end
|
53
53
|
|
54
54
|
test "configuration properties merged successfully" do
|
@@ -72,27 +72,27 @@ module Lazylead
|
|
72
72
|
test "html msg has ticket details" do
|
73
73
|
Smtp.new.enable
|
74
74
|
Task::AssigneeAlert.new.run(
|
75
|
-
NoAuthJira.new("https://jira.
|
75
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
76
76
|
Postman.new,
|
77
77
|
Opts.new(
|
78
78
|
"from" => "fake@email.com",
|
79
|
-
"sql" => "key
|
79
|
+
"sql" => "key=VSCODE-333",
|
80
80
|
"subject" => "[DD] HMCHT!",
|
81
81
|
"template" => "lib/messages/due_date_expired.erb"
|
82
82
|
)
|
83
83
|
)
|
84
84
|
assert_email "[DD] HMCHT!",
|
85
|
-
"
|
85
|
+
"VSCODE-333", "2023-06-28", "Major - P3", "Rhys Howell", "Renew VSCODE automated publishing token"
|
86
86
|
end
|
87
87
|
|
88
88
|
test "send notification about bunch of tickets" do
|
89
89
|
Smtp.new.enable
|
90
90
|
Task::Alert.new.run(
|
91
|
-
NoAuthJira.new("https://jira.
|
91
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
92
92
|
Postman.new,
|
93
93
|
Opts.new(
|
94
94
|
"from" => "fake@email.com",
|
95
|
-
"sql" => "key
|
95
|
+
"sql" => "key=DOCS-19",
|
96
96
|
"subject" => "ALRT: Frozen",
|
97
97
|
"template" => "lib/messages/due_date_expired.erb",
|
98
98
|
"to" => "big.boss@example.com",
|
@@ -100,17 +100,17 @@ module Lazylead
|
|
100
100
|
)
|
101
101
|
)
|
102
102
|
assert_email "ALRT: Frozen",
|
103
|
-
"Hi Boss", "
|
103
|
+
"Hi Boss", "DOCS-19", "2012-09-28", "Major - P3", "Michael Conigliaro", "MongoDB exit code reference"
|
104
104
|
end
|
105
105
|
|
106
106
|
test "cc got notification" do
|
107
107
|
Smtp.new.enable
|
108
108
|
Task::Alert.new.run(
|
109
|
-
NoAuthJira.new("https://jira.
|
109
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
110
110
|
Postman.new,
|
111
111
|
Opts.new(
|
112
112
|
"from" => "fake@email.com",
|
113
|
-
"sql" => "key
|
113
|
+
"sql" => "key=JAVA-295",
|
114
114
|
"subject" => "CC: Watching",
|
115
115
|
"template" => "lib/messages/due_date_expired.erb",
|
116
116
|
"to" => "big.boss@example.com",
|
@@ -126,11 +126,11 @@ module Lazylead
|
|
126
126
|
test "reporter got alert about his/her tickets with expired DD" do
|
127
127
|
Smtp.new.enable
|
128
128
|
Task::ReporterAlert.new.run(
|
129
|
-
NoAuthJira.new("https://jira.
|
129
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
130
130
|
Postman.new,
|
131
131
|
Opts.new(
|
132
132
|
"from" => "fake@email.com",
|
133
|
-
"sql" => "
|
133
|
+
"sql" => "key in (JAVA-151,JAVA-469,JAVA-468,JAVA-500)",
|
134
134
|
"subject" => "DD Expired!",
|
135
135
|
"template" => "lib/messages/due_date_expired.erb"
|
136
136
|
)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -35,12 +35,12 @@ module Lazylead
|
|
35
35
|
test "alert in case fixvesion changed by not authorized person" do
|
36
36
|
Lazylead::Smtp.new.enable
|
37
37
|
Task::FixVersion.new.run(
|
38
|
-
NoAuthJira.new("https://jira.
|
38
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
39
39
|
Postman.new,
|
40
40
|
Opts.new(
|
41
41
|
"to" => "lead@company.com",
|
42
42
|
"from" => "ll@company.com",
|
43
|
-
"jql" => "key
|
43
|
+
"jql" => "key=JAVA-5020",
|
44
44
|
"allowed" => "tom,mike,bob",
|
45
45
|
"fields" => "description,reporter,priority,summary,created,fixVersions",
|
46
46
|
"subject" => "FixVersion: How dare you?",
|
@@ -48,8 +48,9 @@ module Lazylead
|
|
48
48
|
)
|
49
49
|
)
|
50
50
|
assert_email "FixVersion: How dare you?",
|
51
|
-
"
|
52
|
-
"
|
51
|
+
"JAVA-5020", "Minor - P4", "4.10.0", "16-Jun-2023 04:53:47 PM",
|
52
|
+
"Replace @Evolving with @Sealed where appropriate and possible",
|
53
|
+
"tom,mike,bob"
|
53
54
|
end
|
54
55
|
end
|
55
56
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -35,15 +35,15 @@ module Lazylead
|
|
35
35
|
test "notify about team loading" do
|
36
36
|
Lazylead::Smtp.new.enable
|
37
37
|
Task::Loading.new.run(
|
38
|
-
NoAuthJira.new("https://jira.
|
38
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
39
39
|
Postman.new,
|
40
40
|
Opts.new(
|
41
41
|
"to" => "lead@company.com",
|
42
42
|
"from" => "ll@company.com",
|
43
|
-
"jql" => "key in (
|
44
|
-
"team" => "
|
43
|
+
"jql" => "key in (JAVA-2515, JAVA-2514, JAVA-2142, JAVA-2139, JAVA-2137)",
|
44
|
+
"team" => "ross@mongodb.com:Ross Lawley,jeff.yemin@mongodb.com:Jeffrey Yemin,mclaren:Tom McLaren",
|
45
45
|
"user_link" => "https://user.com?id=",
|
46
|
-
"search_link" => "https://jira.
|
46
|
+
"search_link" => "https://jira.mongodb.org/issues/?jql=",
|
47
47
|
"fields" => "assignee,duedate,customfield_10480",
|
48
48
|
"sprint" => "customfield_10480",
|
49
49
|
"subject" => "[LL] Team loading",
|
@@ -51,8 +51,8 @@ module Lazylead
|
|
51
51
|
)
|
52
52
|
)
|
53
53
|
assert_email "[LL] Team loading",
|
54
|
-
"
|
55
|
-
"
|
54
|
+
"ross@mongodb.com", "Ross Lawley", "No sprint: 1",
|
55
|
+
"jeff.yemin@mongodb.com", "Jeffrey Yemin", "No sprint: 4",
|
56
56
|
"Tom McLaren", "0"
|
57
57
|
end
|
58
58
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -35,14 +35,14 @@ module Lazylead
|
|
35
35
|
test "alert in case duedate changed by not authorized person" do
|
36
36
|
Lazylead::Smtp.new.enable
|
37
37
|
Task::Micromanager.new.run(
|
38
|
-
NoAuthJira.new("https://jira.
|
38
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
39
39
|
Postman.new,
|
40
40
|
Opts.new(
|
41
41
|
"to" => "lead@company.com",
|
42
42
|
"from" => "ll@company.com",
|
43
|
-
"jql" => "key in (
|
43
|
+
"jql" => "duedate is not EMPTY and key in (DOCS-194, DOCS-144, DOCS-143)",
|
44
44
|
"fields" => "assignee,duedate,priority,created,summary,reporter",
|
45
|
-
"allowed" => "
|
45
|
+
"allowed" => "matulef,mike,bob",
|
46
46
|
"period" => "86400",
|
47
47
|
"now" => "2009-12-10T00:04:00.000+0000",
|
48
48
|
"subject" => "DD: How dare you?",
|
@@ -50,7 +50,7 @@ module Lazylead
|
|
50
50
|
)
|
51
51
|
)
|
52
52
|
assert_email "DD: How dare you?",
|
53
|
-
"
|
53
|
+
"DOCS-144", "Major - P3", "2012-03-01", "New Documentation Review: Glossary", "matulef,mike,bob"
|
54
54
|
end
|
55
55
|
|
56
56
|
test "since for past 1 min" do
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -35,13 +35,13 @@ module Lazylead
|
|
35
35
|
test "alert in case missing comment" do
|
36
36
|
Lazylead::Smtp.new.enable
|
37
37
|
Task::MissingComment.new.run(
|
38
|
-
NoAuthJira.new("https://jira.
|
38
|
+
NoAuthJira.new("https://jira.mongodb.org"),
|
39
39
|
Postman.new,
|
40
40
|
Opts.new(
|
41
41
|
"to" => "lead@company.com",
|
42
42
|
"addressee" => "Tom",
|
43
43
|
"from" => "ll@company.com",
|
44
|
-
"jql" => "key=
|
44
|
+
"jql" => "key=JAVA-65",
|
45
45
|
"text" => "ftp.com/demo.avi",
|
46
46
|
"details" => "reference to <code>ftp.com/demo.avi</code>",
|
47
47
|
"subject" => "Expected ftp link is missing",
|
@@ -50,7 +50,7 @@ module Lazylead
|
|
50
50
|
)
|
51
51
|
)
|
52
52
|
assert_email "Expected ftp link is missing",
|
53
|
-
"
|
53
|
+
"JAVA-65", "Minor - P4", "http://github.com/mongodb/mongo-java-driver/commit/729fc494e5305d362eea95b01c381f2a7daf2652"
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -30,14 +30,14 @@ require_relative "../../../../lib/lazylead/postman"
|
|
30
30
|
require_relative "../../../../lib/lazylead/task/svn/diff"
|
31
31
|
|
32
32
|
module Lazylead
|
33
|
+
# @todo #/DEV Svn::Diff Add test to check engine structure without email sending
|
33
34
|
class DiffTest < Lazylead::Test
|
34
35
|
# @todo #/DEV Right now its impossible to check that attachment is present in email as we
|
35
36
|
# removing the directory with attachments once SVN::Diff is sent the email through the postman.
|
36
37
|
# Think about how to test this case in automatically, because for now we are doing it manually
|
37
38
|
# during the development.
|
38
39
|
test "changes since revision" do
|
39
|
-
skip "No svn credentials provided" unless env? "svn_log_user",
|
40
|
-
"svn_log_password"
|
40
|
+
skip "No svn credentials provided" unless env? "svn_log_user", "svn_log_password"
|
41
41
|
skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"
|
42
42
|
Lazylead::Smtp.new.enable
|
43
43
|
Task::Svn::Diff.new.run(
|
@@ -46,8 +46,8 @@ module Lazylead
|
|
46
46
|
Opts.new(
|
47
47
|
"from" => "svnlog@test.com",
|
48
48
|
"svn_url" => "https://svn.riouxsvn.com/touch4ll",
|
49
|
-
"svn_user" => ENV
|
50
|
-
"svn_password" => ENV
|
49
|
+
"svn_user" => ENV.fetch("svn_log_user", nil),
|
50
|
+
"svn_password" => ENV.fetch("svn_log_password", nil),
|
51
51
|
"commit_url" => "https://view.commit.com?rev=",
|
52
52
|
"user" => "https://user.com?id=",
|
53
53
|
"to" => "lead@fake.com",
|
@@ -62,8 +62,7 @@ module Lazylead
|
|
62
62
|
end
|
63
63
|
|
64
64
|
test "changes since revision with attachment" do
|
65
|
-
skip "No svn credentials provided" unless env? "svn_log_user",
|
66
|
-
"svn_log_password"
|
65
|
+
skip "No svn credentials provided" unless env? "svn_log_user", "svn_log_password"
|
67
66
|
skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"
|
68
67
|
skip "No postman credentials provided" unless env? "LL_SMTP_HOST",
|
69
68
|
"LL_SMTP_PORT",
|
@@ -74,22 +73,22 @@ module Lazylead
|
|
74
73
|
Lazylead::Smtp.new(
|
75
74
|
Log.new.verbose,
|
76
75
|
NoSalt.new,
|
77
|
-
smtp_host: ENV
|
78
|
-
smtp_port: ENV
|
79
|
-
smtp_user: ENV
|
80
|
-
smtp_pass: ENV
|
76
|
+
smtp_host: ENV.fetch("LL_SMTP_HOST", nil),
|
77
|
+
smtp_port: ENV.fetch("LL_SMTP_PORT", nil),
|
78
|
+
smtp_user: ENV.fetch("LL_SMTP_USER", nil),
|
79
|
+
smtp_pass: ENV.fetch("LL_SMTP_PASS", nil)
|
81
80
|
).enable
|
82
81
|
Task::Svn::Diff.new.run(
|
83
82
|
[],
|
84
83
|
Postman.new,
|
85
84
|
Opts.new(
|
86
|
-
"from" => ENV
|
85
|
+
"from" => ENV.fetch("LL_SMTP_FROM", nil),
|
87
86
|
"svn_url" => "https://svn.riouxsvn.com/touch4ll",
|
88
|
-
"svn_user" => ENV
|
89
|
-
"svn_password" => ENV
|
87
|
+
"svn_user" => ENV.fetch("svn_log_user", nil),
|
88
|
+
"svn_password" => ENV.fetch("svn_log_password", nil),
|
90
89
|
"commit_url" => "https://view.commit.com?rev=",
|
91
90
|
"user" => "https://user.com?id=",
|
92
|
-
"to" => ENV
|
91
|
+
"to" => ENV.fetch("LL_SMTP_TO", nil),
|
93
92
|
"since_rev" => "1",
|
94
93
|
"subject" => "[SVN] Changed since rev1",
|
95
94
|
"template" => "lib/messages/svn_diff.erb",
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License
|
4
4
|
#
|
5
|
-
# Copyright (c) 2019-
|
5
|
+
# Copyright (c) 2019-2022 Yurii Dubinka
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"),
|
@@ -31,6 +31,7 @@ require_relative "../../../../lib/lazylead/task/svn/grep"
|
|
31
31
|
require_relative "../../../../lib/lazylead/task/svn/svn"
|
32
32
|
|
33
33
|
module Lazylead
|
34
|
+
# @todo #/DEV Svn::Grep Add test to check engine structure without email sending
|
34
35
|
class GrepTest < Lazylead::Test
|
35
36
|
test "changes with text" do
|
36
37
|
skip "No svn credentials provided" unless env? "svn_log_user", "svn_log_password"
|
@@ -43,8 +44,8 @@ module Lazylead
|
|
43
44
|
"from" => "svnlog@test.com",
|
44
45
|
"text" => "ping",
|
45
46
|
"svn_url" => "https://svn.riouxsvn.com/touch4ll",
|
46
|
-
"svn_user" => ENV
|
47
|
-
"svn_password" => ENV
|
47
|
+
"svn_user" => ENV.fetch("svn_log_user", nil),
|
48
|
+
"svn_password" => ENV.fetch("svn_log_password", nil),
|
48
49
|
"commit_url" => "https://view.commit.com?rev=",
|
49
50
|
"user" => "https://user.com?id=",
|
50
51
|
"to" => "lead@fake.com",
|