Copilot commented on code in PR #7223:
URL: https://github.com/apache/texera/pull/7223#discussion_r3694806559
##########
amber/src/test/scala/org/apache/texera/web/resource/pythonvirtualenvironment/PveResourceSpec.scala:
##########
@@ -429,4 +429,42 @@ class PveResourceSpec
val resp = new PveResource().deletePveFromDb(-1, sessionUser)
resp.getStatus shouldBe Response.Status.NOT_FOUND.getStatusCode
}
+
+ "PveResource.getSystemPackages" should "wrap the manager's list under a
'system' key" in {
+ val result = new PveResource().getSystemPackages
+ result.keySet.asScala shouldBe Set("system")
+ result.get("system") shouldBe PveManager.getSystemPackages.toList.asJava
+ }
Review Comment:
This test can become order-dependent: `PveManager.getSystemPackages` may
lazily resolve the system set by spawning mocked child processes, but this test
doesn’t set `runProcessMock` expectations via `expectProcessCalls()`. Running
only this test (or reordering tests) can fail with an unexpected mock
invocation. Add `expectProcessCalls()` here to make the test self-contained.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]