guardian / grid

The Guardian’s image management system
https://www.theguardian.com/info/developer-blog/2015/aug/12/open-sourcing-grid-image-service
Apache License 2.0
1.44k stars 120 forks source link

Fix test running in IntelliJ UI by resolving ScalaTest 3.1 vs 3.2 conflict #4286

Closed tonytw1 closed 2 months ago

tonytw1 commented 3 months ago

What does this change?

Fixes this error when trying to run a single test in the IntelliJ IDE:

Screenshot 2024-06-09 at 18 43 03

Downgrade "org.scalatestplus" %% "mockito-3-4" to 3.1 series to match the 3.1 ScalaTest pulled in by scalatestplus-play.

Resolves a scalac -deprecation snag which breaks running of tests in IntelliJ. Warns about a deprecation on .right.value but then doesn't know about the new method because ScalaTest 3.2 is not available on the IntelliJ classpath.

This commit works by pushing the transitive ScalaTest from "org.scalatestplus" %% "mockito-3-4" back down to 3.1 for compatibility with "scalatestplus-play".

Notably "scalatestplus-play" cannot be leveled to 6.0.0 / ScalaTest 3.2 without moving to Scala 2.13 because it has not been released for 2.12.

How should a reviewer test this change?

How can success be measured?

Single tests can be run in the IDE. Faster feedback loop. Prevent the urban myth that you can't run tests in the IDE from taking hold.

Who should look at this?

Tested? Documented?

tonytw1 commented 3 months ago

CI passes after rebasing to pickup recent docker image during tests changes.

prout-bot commented 2 months ago

Seen on auth, usage, image-loader, metadata-editor, leases, cropper, media-api, kahuna (merged by @tonytw1 25 minutes and 35 seconds ago) Please check your changes!

prout-bot commented 2 months ago

Seen on thrall (merged by @tonytw1 25 minutes and 39 seconds ago) Please check your changes!

prout-bot commented 2 months ago

Seen on collections (merged by @tonytw1 25 minutes and 43 seconds ago) Please check your changes!