Bump scalatest to 3.2.16 Change-Id: Ibc9d97384b2f3e5793e1a2c282bae8c779f03ce2
diff --git a/build.sbt b/build.sbt index a0ebc39..23b5f1d 100644 --- a/build.sbt +++ b/build.sbt
@@ -30,7 +30,7 @@ "com.google.gerrit" % "gerrit-acceptance-framework" % gerritApiVersion % Test, "org.bouncycastle" % "bcpg-jdk15on" % "1.61" % Test, - "org.scalatest" %% "scalatest" % "3.0.1" % Test, + "org.scalatest" %% "scalatest" % "3.2.16" % Test, "net.codingwell" %% "scala-guice" % "5.0.0" % Test), assembly / assemblyJarName := s"$pluginName.jar",
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/BotLikeExtractorImplSpec.scala b/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/BotLikeExtractorImplSpec.scala index 42b0d1c..83e3871 100644 --- a/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/BotLikeExtractorImplSpec.scala +++ b/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/BotLikeExtractorImplSpec.scala
@@ -16,9 +16,10 @@ import com.googlesource.gerrit.plugins.analytics.AnalyticsConfig import com.googlesource.gerrit.plugins.analytics.test.GerritTestDaemon -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.flatspec.AnyFlatSpecLike +import org.scalatest.matchers.should.Matchers -class BotLikeExtractorImplSpec extends FlatSpec with Matchers with GerritTestDaemon { +class BotLikeExtractorImplSpec extends AnyFlatSpecLike with Matchers with GerritTestDaemon { behavior of "isBotLike"
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/BranchesExtractorSpec.scala b/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/BranchesExtractorSpec.scala index 07909ff..d765af3 100644 --- a/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/BranchesExtractorSpec.scala +++ b/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/BranchesExtractorSpec.scala
@@ -2,10 +2,11 @@ import com.google.gerrit.acceptance.UseLocalDisk import com.googlesource.gerrit.plugins.analytics.test.GerritTestDaemon -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.flatspec.AnyFlatSpecLike +import org.scalatest.matchers.should.Matchers @UseLocalDisk -class BranchesExtractorSpec extends FlatSpec with Matchers with GerritTestDaemon { +class BranchesExtractorSpec extends AnyFlatSpecLike with Matchers with GerritTestDaemon { def commitsBranches = new BranchesExtractor(testFileRepository.getRepository) behavior of "branchesOfCommit"
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/IgnoreFileSuffixFilterSpec.scala b/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/IgnoreFileSuffixFilterSpec.scala index 4ed373c..aefd3c2 100644 --- a/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/IgnoreFileSuffixFilterSpec.scala +++ b/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/IgnoreFileSuffixFilterSpec.scala
@@ -18,10 +18,11 @@ import com.googlesource.gerrit.plugins.analytics.AnalyticsConfig import com.googlesource.gerrit.plugins.analytics.test.GerritTestDaemon import org.eclipse.jgit.treewalk.TreeWalk -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.flatspec.AnyFlatSpecLike +import org.scalatest.matchers.should.Matchers @UseLocalDisk -class IgnoreFileSuffixFilterSpec extends FlatSpec with Matchers with GerritTestDaemon { +class IgnoreFileSuffixFilterSpec extends AnyFlatSpecLike with Matchers with GerritTestDaemon { behavior of "IgnoreFileSuffixFilter"
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/UserActivityHistogramSpec.scala b/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/UserActivityHistogramSpec.scala index 7dbe121..2c680e8 100644 --- a/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/UserActivityHistogramSpec.scala +++ b/src/test/scala/com/googlesource/gerrit/plugins/analytics/common/UserActivityHistogramSpec.scala
@@ -17,10 +17,11 @@ import com.google.gerrit.acceptance.UseLocalDisk import com.googlesource.gerrit.plugins.analytics.common.AggregationStrategy.EMAIL_YEAR import com.googlesource.gerrit.plugins.analytics.test.GerritTestDaemon -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.flatspec.AnyFlatSpecLike +import org.scalatest.matchers.should.Matchers @UseLocalDisk -class UserActivityHistogramSpec extends FlatSpec with Matchers with GerritTestDaemon { +class UserActivityHistogramSpec extends AnyFlatSpecLike with Matchers with GerritTestDaemon { "UserActivityHistogram" should "return no activities" in { val filter = new AggregatedHistogramFilterByDates(aggregationStrategy = EMAIL_YEAR)
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/AggregatedHistogramFilterByDatesSpec.scala b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/AggregatedHistogramFilterByDatesSpec.scala index 3128b2c..c21d52d 100644 --- a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/AggregatedHistogramFilterByDatesSpec.scala +++ b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/AggregatedHistogramFilterByDatesSpec.scala
@@ -21,10 +21,12 @@ import com.googlesource.gerrit.plugins.analytics.common.{AggregatedHistogramFilterByDates, BranchesExtractor} import org.eclipse.jgit.lib.PersonIdent import org.gitective.core.CommitFinder -import org.scalatest.{BeforeAndAfterEach, FlatSpec, Matchers} +import org.scalatest.BeforeAndAfterEach +import org.scalatest.flatspec.AnyFlatSpecLike +import org.scalatest.matchers.should.Matchers @UseLocalDisk -class AggregatedHistogramFilterByDatesSpec extends FlatSpec with GerritTestDaemon with BeforeAndAfterEach with Matchers { +class AggregatedHistogramFilterByDatesSpec extends AnyFlatSpecLike with GerritTestDaemon with BeforeAndAfterEach with Matchers { "Author history filter" should "select one commit without intervals restriction" in {
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/AggregationSpec.scala b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/AggregationSpec.scala index 7a0fc84..063045b 100644 --- a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/AggregationSpec.scala +++ b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/AggregationSpec.scala
@@ -20,10 +20,12 @@ import com.googlesource.gerrit.plugins.analytics.common.DateConversions.StringOps import com.googlesource.gerrit.plugins.analytics.common.TestUtils import org.eclipse.jgit.revwalk.RevCommit -import org.scalatest.{FlatSpec, Inspectors, Matchers} +import org.scalatest.Inspectors +import org.scalatest.flatspec.AnyFlatSpecLike +import org.scalatest.matchers.should.Matchers @UseLocalDisk -class AggregationSpec extends FlatSpec with Matchers with GerritTestDaemon with TestUtils with Inspectors { +class AggregationSpec extends AnyFlatSpecLike with Matchers with GerritTestDaemon with TestUtils with Inspectors { def commitAtDate(committer: String, when: String, content: String): RevCommit = { val personIdent = newPersonIdent(committer, committer, new Date(when.isoStringToLongDate))
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/CommitInfoSpec.scala b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/CommitInfoSpec.scala index 4873328..02b74f0 100644 --- a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/CommitInfoSpec.scala +++ b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/CommitInfoSpec.scala
@@ -2,9 +2,10 @@ import com.googlesource.gerrit.plugins.analytics.CommitInfo import com.googlesource.gerrit.plugins.analytics.common.GsonFormatter -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.flatspec.AnyFlatSpecLike +import org.scalatest.matchers.should.Matchers -class CommitInfoSpec extends FlatSpec with Matchers { +class CommitInfoSpec extends AnyFlatSpecLike with Matchers { "CommitInfo" should "be serialised as JSON correctly" in { val commitInfo = CommitInfo(sha1 = "sha", date = 1000l, merge = false, botLike = false, files = Set("file1", "file2"))
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/CommitStatisticsCommentLinkSpec.scala b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/CommitStatisticsCommentLinkSpec.scala index c02cb0c..2e5b756 100644 --- a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/CommitStatisticsCommentLinkSpec.scala +++ b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/CommitStatisticsCommentLinkSpec.scala
@@ -20,12 +20,14 @@ import com.googlesource.gerrit.plugins.analytics.IssueInfo import com.googlesource.gerrit.plugins.analytics.common.{CommitsStatistics, Statistics} import org.eclipse.jgit.lib.Repository -import org.scalatest.{FlatSpec, Inside, Matchers} +import org.scalatest.Inside +import org.scalatest.flatspec.AnyFlatSpecLike +import org.scalatest.matchers.should.Matchers import scala.collection.JavaConverters._ @UseLocalDisk -class CommitStatisticsCommentLinkSpec extends FlatSpec with GerritTestDaemon with TestCommitStatisticsNoCache with Matchers with Inside { +class CommitStatisticsCommentLinkSpec extends AnyFlatSpecLike with GerritTestDaemon with TestCommitStatisticsNoCache with Matchers with Inside { def createCommentLinkInfo(pattern: String, link: Option[String] = None, html: Option[String] = None) = { val info = new CommentLinkInfo
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/CommitStatisticsSpec.scala b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/CommitStatisticsSpec.scala index cb000e6..41cce72 100644 --- a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/CommitStatisticsSpec.scala +++ b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/CommitStatisticsSpec.scala
@@ -18,10 +18,12 @@ import com.google.gerrit.entities.Project import com.googlesource.gerrit.plugins.analytics.CommitInfo import com.googlesource.gerrit.plugins.analytics.common.{CommitsStatistics, Statistics} -import org.scalatest.{FlatSpec, Inside, Matchers} +import org.scalatest.Inside +import org.scalatest.flatspec.AnyFlatSpecLike +import org.scalatest.matchers.should.Matchers @UseLocalDisk -class CommitStatisticsSpec extends FlatSpec with GerritTestDaemon with TestCommitStatisticsNoCache with Matchers with Inside { +class CommitStatisticsSpec extends AnyFlatSpecLike with GerritTestDaemon with TestCommitStatisticsNoCache with Matchers with Inside { class TestEnvironment { val repo = fileRepository val stats = new Statistics(fileRepositoryName, commitsStatisticsNoCache)
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/ContributorsServiceSpec.scala b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/ContributorsServiceSpec.scala index acefed1..dea1ef8 100644 --- a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/ContributorsServiceSpec.scala +++ b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/ContributorsServiceSpec.scala
@@ -22,12 +22,14 @@ import com.googlesource.gerrit.plugins.analytics.common.AggregationStrategy.EMAIL_HOUR import com.googlesource.gerrit.plugins.analytics.common.GsonFormatter import com.googlesource.gerrit.plugins.analytics.test.TestAnalyticsConfig.IGNORED_FILE_SUFFIX -import org.scalatest.{FlatSpec, Inside, Matchers} +import org.scalatest.Inside +import org.scalatest.flatspec.AnyFlatSpecLike +import org.scalatest.matchers.should.Matchers import scala.collection.JavaConverters._ @UseLocalDisk -class ContributorsServiceSpec extends FlatSpec with Matchers with GerritTestDaemon with Inside { +class ContributorsServiceSpec extends AnyFlatSpecLike with Matchers with GerritTestDaemon with Inside { "ContributorsService" should "get commit statistics" in { val aContributorName = "Contributor Name"
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/UserActivitySummarySpec.scala b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/UserActivitySummarySpec.scala index a5a5e10..3e2289e 100644 --- a/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/UserActivitySummarySpec.scala +++ b/src/test/scala/com/googlesource/gerrit/plugins/analytics/test/UserActivitySummarySpec.scala
@@ -6,10 +6,11 @@ import com.googlesource.gerrit.plugins.analytics.common.AggregationStrategy.EMAIL import com.googlesource.gerrit.plugins.analytics.common.{Statistics, TestUtils} import org.eclipse.jgit.lib.Repository -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.flatspec.AnyFlatSpecLike +import org.scalatest.matchers.should.Matchers @UseLocalDisk -class UserActivitySummarySpec extends FlatSpec with GerritTestDaemon with TestCommitStatisticsNoCache with TestUtils with Matchers { +class UserActivitySummarySpec extends AnyFlatSpecLike with GerritTestDaemon with TestCommitStatisticsNoCache with TestUtils with Matchers { "numCommits" should "count only comments filtered by their merge status" in { val personEmail = "aCommitter@aCompany.com"