Skip to content

Commit

Permalink
#682: Update rubocop-minitest requirement from = 0.20.1 to = 0.30.0
Browse files Browse the repository at this point in the history
Updates the requirements on [rubocop-minitest](https://github.com/rubocop/rubocop-minitest) to permit the latest version.
- [Release notes](https://github.com/rubocop/rubocop-minitest/releases)
- [Changelog](https://github.com/rubocop/rubocop-minitest/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop-minitest@v0.20.1...v0.30.0)

---
updated-dependencies:
- dependency-name: rubocop-minitest
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yurii Dubinka <[email protected]>
  • Loading branch information
dependabot[bot] and dgroup authored Aug 15, 2023
1 parent 71769dc commit e5bcc40
Show file tree
Hide file tree
Showing 28 changed files with 60 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ Minitest/RefutePathExists: # (new in 0.10)
Enabled: true
Minitest/TestMethodName: # (new in 0.10)
Enabled: true
Minitest/TestFileName:
Enabled: true
Exclude:
- "test/test.rb"
Minitest/UnspecifiedException: # (new in 0.10)
Enabled: true
Performance/AncestorsInclude: # (new in 1.7)
Expand Down
2 changes: 1 addition & 1 deletion lazylead.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ tasks instead of solving technical problems."
s.add_development_dependency "random-port", "0.5.1"
s.add_development_dependency "rdoc", "6.4.0"
s.add_development_dependency "rubocop", "1.50.2"
s.add_development_dependency "rubocop-minitest", "0.20.1"
s.add_development_dependency "rubocop-minitest", "0.30.0"
s.add_development_dependency "rubocop-performance", "1.16.0"
s.add_development_dependency "rubocop-rake", "0.6.0"
s.add_development_dependency "rubocop-rspec", "2.11.1"
Expand Down
3 changes: 3 additions & 0 deletions test/lazylead/cc_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class PredefinedCcTest < Lazylead::Test
# lead's email, thus, its took few minutes for huge projects.
test "cc by component is found" do
skip "Disabled due to performance issue with Jira API"

assert_equal ENV.fetch("cc_email", nil),
ComponentCC.new(
ENV.fetch("cc_project", nil),
Expand All @@ -136,6 +137,7 @@ class PredefinedCcTest < Lazylead::Test
vcs4sql: "upgrades/sqlite",
testdata: true
)

assert_equal %w[[email protected] [email protected]],
ORM::Task.find(3).detect_cc(nil)["cc"].cc
end
Expand All @@ -147,6 +149,7 @@ class PredefinedCcTest < Lazylead::Test
vcs4sql: "upgrades/sqlite",
testdata: true
)

assert_equal %w[[email protected] [email protected]],
ORM::Task.find(165).detect_cc(nil)["cc"].cc("jvm", "jdbc")
end
Expand Down
3 changes: 3 additions & 0 deletions test/lazylead/cli/app_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class AppTest < Lazylead::SqliteTest
sqlite: "test/resources/#{no_ext(__FILE__)}.#{__method__}.db",
vcs4sql: "upgrades/sqlite"
)

assert_tables "test/resources/#{no_ext(__FILE__)}.#{__method__}.db",
systems: %w[id properties],
teams: %w[id name properties],
Expand All @@ -52,6 +53,7 @@ class AppTest < Lazylead::SqliteTest
vcs4sql: "upgrades/sqlite",
testdata: true
)

assert_equal "BA squad",
ORM::Team.find(1).name,
"Required team record wasn't found in the database"
Expand All @@ -65,6 +67,7 @@ class AppTest < Lazylead::SqliteTest
testdata: true
)
sleep 0.4

assert (Time.now - 5.seconds) < Time.parse(File.open("test/resources/echo.txt").first),
"Scheduled task wasn't executed few seconds ago"
end
Expand Down
6 changes: 6 additions & 0 deletions test/lazylead/model_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class OrmTest < Lazylead::SqliteTest
vcs4sql: "upgrades/sqlite",
testdata: true
)

assert_equal "${usr}", ORM::Team.find(1).to_hash["usr"]
end

Expand All @@ -48,6 +49,7 @@ class OrmTest < Lazylead::SqliteTest
vcs4sql: "upgrades/sqlite",
testdata: true
)

assert_equal "Mike",
ORM::Team.find(1).env(ORM::Team.find(1).to_hash)["usr"]
end
Expand All @@ -59,6 +61,7 @@ class OrmTest < Lazylead::SqliteTest
vcs4sql: "upgrades/sqlite",
testdata: true
)

assert_kind_of Lazylead::Postman, ORM::Task.find(5).postman
end

Expand All @@ -70,6 +73,7 @@ class OrmTest < Lazylead::SqliteTest
vcs4sql: "upgrades/sqlite",
testdata: true
)

assert_equal "value", ORM::Task.find(171).props["envkey"]
end

Expand All @@ -80,6 +84,7 @@ class OrmTest < Lazylead::SqliteTest
vcs4sql: "upgrades/sqlite",
testdata: true
)

refute_predicate ORM::Task.find(260), :to_h?
end

Expand All @@ -90,6 +95,7 @@ class OrmTest < Lazylead::SqliteTest
vcs4sql: "upgrades/sqlite",
testdata: true
)

assert_kind_of Jira, ORM::Task.find(270).second_sys
end
end
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/opts_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class OptsTest < Lazylead::Test
test "able to write by key" do
opts = Opts.new
opts["key"] = "value"

assert_equal "value", opts["key"]
end

Expand Down
2 changes: 2 additions & 0 deletions test/lazylead/salt_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ module Lazylead
class SaltTest < Lazylead::Test
test "e2e encryption/decryption is successful" do
ENV["s"] = "E1F53135E559C2530000000000000000"

assert_equal "the-password",
Salt.new("s").decrypt(Salt.new("s").encrypt("the-password"))
end

test "decryption is successful" do
ENV["s"] = "E1F53135E559C2530000000000000000"

assert_equal "the-best-password",
Salt.new("s").decrypt("VUxpSk83d3VGOHZMVTBvWmZ5eGlEOWdPZFhJN0tYMXhwaDd0MVg0L01PST0tLUc0bEhIVTBNRDFzdDdTSkNoeVAyckE9PQ==--4a0206700a28b69aaca65a88af09d211f4251f02")
end
Expand Down
2 changes: 2 additions & 0 deletions test/lazylead/smoke_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class EnvTest < Lazylead::Test
test "ENV has keys" do
ENV["a"] = "aaa"
ENV["b"] = "bbb"

assert env? "a", "b"
end
test "ENV has no key" do
Expand All @@ -41,6 +42,7 @@ class EnvTest < Lazylead::Test
f << "EnvTest=value"
f.flush
IniFile.new(filename: f).each { |_, k, v| ENV[k] = v }

assert_equal "value", ENV.fetch("EnvTest", nil)
end
end
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/smtp_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class SmtpTest < Lazylead::Test
subject "The fake!"
body "Fake body"
end

assert_equal(1, Mail::TestMailer.deliveries.count { |m| m.subject.eql? "The fake!" })
end

Expand Down
2 changes: 2 additions & 0 deletions test/lazylead/system/jira_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class JiraTest < Lazylead::Test
vcs4sql: "upgrades/sqlite",
testdata: true
)

assert_equal "JAVA-150",
ORM::Task.find(4)
.system
Expand Down Expand Up @@ -139,6 +140,7 @@ def save!(body)
end
end.new
Issue.new(issue, Fake.new).post("Hi there!")

assert_equal "Hi there!", issue.comment[:body]
end

Expand Down
4 changes: 4 additions & 0 deletions test/lazylead/task/accuracy/accuracy_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class AccuracyTest < Lazylead::Test
"template" => "lib/messages/accuracy.erb"
)
)

assert_email "[LL] Estimated accuracy for reported tickets",
"JAVA-151", "0.5", "100%", "Tsz Ming Wong", "Dot allowed in key names"
end
Expand All @@ -71,12 +72,14 @@ class AccuracyTest < Lazylead::Test
vcs4sql: "upgrades/sqlite",
testdata: true
)

assert_kind_of Lazylead::Task::Accuracy,
ORM::Task.find(195).action.constantize.new
end

test "one ticket found" do
Lazylead::Smtp.new.enable

assert_equal 1,
Task::Accuracy.new.run(
NoAuthJira.new("https://jira.mongodb.org"),
Expand Down Expand Up @@ -119,6 +122,7 @@ class AccuracyTest < Lazylead::Test
"template" => "lib/messages/accuracy.erb"
)
)

assert_email "[LL] Check JAVA-4344",
"JAVA-4344", "3", "42.86%"
end
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/accuracy/onlyll_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class OnlyLLTest < Lazylead::Test
"template" => "lib/messages/only_ll.erb"
)
)

assert_email "[LL] Only",
"JAVA-295", "Major - P3", "Support Android platform"
end
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/alert/alertif_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class AlertIfTest < Lazylead::Test
"template" => "lib/messages/alertif.erb"
)
)

assert_email "[LL] alert if",
"JAVA-500", "Major - P3", "Closed", "Uladzimir Mihura", "Jeffrey Yemin", "m/r out:db and out:sharded options"
end
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/alert/assignee_alert_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class AssigneeAlertTest < Lazylead::Test
vcs4sql: "upgrades/sqlite",
testdata: true
)

assert_equal "[email protected]", ORM::Task.find(154).props["cc"]
end
end
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/assignment_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class AssignmentTest < Lazylead::Test
"template" => "lib/messages/illegal_assignee_change.erb"
)
)

assert_email "Assignment: How dare you?",
"JAVA-4190", "Jeffrey Yemin", "Valentin Kavalenka",
"Client side builder for operators supported by $search", "Nihal Jain"
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/created_recently_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class CreatedRecentlyTest < Lazylead::Test
"template" => "lib/messages/created_recently.erb"
)
)

assert_email "[CR] 20min ago!",
"JAVA-4403", "JAVA-4417"
end
Expand Down
5 changes: 5 additions & 0 deletions test/lazylead/task/duedate_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class DuedateTest < Lazylead::Test
vcs4sql: "upgrades/sqlite",
testdata: true
)

assert_entries(
{
"sql" => "filter=100500",
Expand All @@ -81,6 +82,7 @@ class DuedateTest < Lazylead::Test
"template" => "lib/messages/due_date_expired.erb"
)
)

assert_email "[DD] HMCHT!",
"VSCODE-333", "2023-06-28", "Major - P3", "Rhys Howell", "Renew VSCODE automated publishing token"
end
Expand All @@ -99,6 +101,7 @@ class DuedateTest < Lazylead::Test
"addressee" => "Boss"
)
)

assert_email "ALRT: Frozen",
"Hi Boss", "DOCS-19", "2012-09-28", "Major - P3", "Michael Conigliaro", "MongoDB exit code reference"
end
Expand All @@ -118,6 +121,7 @@ class DuedateTest < Lazylead::Test
"cc" => "[email protected],[email protected]"
)
)

assert_equal %w[[email protected] [email protected]],
Mail::TestMailer.deliveries
.find { |m| m.subject.eql? "CC: Watching" }.cc
Expand All @@ -135,6 +139,7 @@ class DuedateTest < Lazylead::Test
"template" => "lib/messages/due_date_expired.erb"
)
)

assert_equal(2, Mail::TestMailer.deliveries.count { |m| m.subject.eql? "DD Expired!" })
end
end
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/fix_version_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class FixVersionTest < Lazylead::Test
"template" => "lib/messages/illegal_fixversion_change.erb"
)
)

assert_email "FixVersion: How dare you?",
"JAVA-5020", "Minor - P4", "4.10.0", "16-Jun-2023 04:53:47 PM",
"Replace @Evolving with @Sealed where appropriate and possible",
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/loading_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class LoadingTest < Lazylead::Test
"template" => "lib/messages/loading.erb"
)
)

assert_email "[LL] Team loading",
"[email protected]", "Ross Lawley", "No sprint: 1",
"[email protected]", "Jeffrey Yemin", "No sprint: 4",
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/micromanager_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class MicromanagerTest < Lazylead::Test
"template" => "lib/messages/illegal_duedate_change.erb"
)
)

assert_email "DD: How dare you?",
"DOCS-144", "Major - P3", "2012-03-01", "New Documentation Review: Glossary", "matulef,mike,bob"
end
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/missing_comment_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class MissingCommentTest < Lazylead::Test
"template_details" => "reference to <a href='file://ftp/path'>ftp</a>"
)
)

assert_email "Expected ftp link is missing",
"JAVA-65", "Minor - P4", "http://github.com/mongodb/mongo-java-driver/commit/729fc494e5305d362eea95b01c381f2a7daf2652"
end
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/propagate_down_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def save!(body)
"propagate" => "customfield_101,customfield_102"
)
)

assert_entries(
{
"customfield_101" => "Tomorrow",
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/savepoint_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class SavepointTest < Lazylead::Test
"to" => "[email protected]"
)
)

assert_equal 'text/markdown; filename="readme.md"',
Mail::TestMailer.deliveries
.find { |m| m.subject.eql? "[LL] Configuration backup" }
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/svn/diff_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class DiffTest < Lazylead::Test
"template-attachment" => "lib/messages/svn_diff_attachment.erb"
)
)

assert_email_line "[SVN] Changed since rev1", %w[r2 by dgroup at 16-08-2020]
# assert_attachment "[SVN] Changed since rev1", /^.*svn-log-.*.html.zip$/
end
Expand Down
1 change: 1 addition & 0 deletions test/lazylead/task/svn/grep_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class GrepTest < Lazylead::Test
"template" => "lib/messages/svn_grep.erb"
)
)

assert_email_line "[SVN] Changes with text",
%w[r2 by dgroup at 2020-08-16]
end
Expand Down
5 changes: 5 additions & 0 deletions test/lazylead/task/svn/touch_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ class TouchTest < Lazylead::Test
"template" => "lib/messages/svn_touch.erb"
)
)

assert_email "[SVN] Important files have been changed!",
"3", "dgroup", "/189.md", "Add description for 189 issue"
end

test "file location detected in all branches" do
skip "No svn credentials provided" unless env? "svn_touch_user", "svn_touch_password"
skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"

assert_array %w[branches/0.13.x/readme.md trunk/readme.md],
Task::Svn::Touch.new.locations(
Opts.new("svn_url" => "https://svn.riouxsvn.com/touch4ll",
Expand All @@ -72,6 +74,7 @@ class TouchTest < Lazylead::Test
test "svn log with entries from all branches" do
skip "No svn credentials provided" unless env? "svn_touch_user", "svn_touch_password"
skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"

assert_equal 6,
Task::Svn::Touch.new.svn_log(
Opts.new("svn_url" => "https://svn.riouxsvn.com/touch4ll",
Expand All @@ -86,6 +89,7 @@ class TouchTest < Lazylead::Test
test "svn log has one entry from non specified branch" do
skip "No svn credentials provided" unless env? "svn_touch_user", "svn_touch_password"
skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"

assert_single_entry(
{
"revision" => "9",
Expand All @@ -107,6 +111,7 @@ class TouchTest < Lazylead::Test
test "svn log has one entry from specified branch" do
skip "No svn credentials provided" unless env? "svn_touch_user", "svn_touch_password"
skip "No internet connection to riouxsvn.com" unless ping? "riouxsvn.com"

assert_single_entry(
{
"revision" => "9",
Expand Down
Loading

0 comments on commit e5bcc40

Please sign in to comment.