Files
jenkins/core
Mark Waite c62f3619db Use assert instead of assume in several tests (#27258)
* Use assertions in test body instead of assumptions in SlaveTest

Failed assumptions silently ignore the test

Failed assertions call us to immediate action

* Use assertEquals instead of assumeTrue in ArgumentListBuilder2Test

* Use assertFalse, not assumeFalse in UpdateCenterPluginInstallTest

Fail the tests if updates.jenkins-ci.org cannot be resolved rather than
quietly skipping the tests.  If our tests need to be resilient to DNS
lookup failures, there are many other places that need to be changed.

* Assert rather than assume white listed classes include LinkedListMultimap in ClassFilterImplTest

* Remove assume that checked if tests are running in Jetty servlet context in SystemPropertiesTest

Tests always run with Jetty servlet context.

* Replace assume with assert in FilePathTest

If the assumption were not satisfied, the test would be skipped insted
of failing.

Better to fail the test explicitly than to quietly skip the test and
rely on review of the results to detect the test was skipped.

Testing done:

* Confirmed the test continues to pass
2026-09-06 14:29:49 -06:00
..