File tree Expand file tree Collapse file tree
pants-plugins/uses_services Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 python-version-short : ' 3.8'
4040 python-version : ' 3.8.10'
4141
42+ services :
43+ mongo :
44+ image : mongo:4.4
45+ ports :
46+ - 27017:27017
47+
4248 env :
4349 COLUMNS : ' 120'
4450
Original file line number Diff line number Diff line change @@ -2,4 +2,8 @@ python_sources()
22
33python_tests (
44 name = "tests" ,
5+ overrides = {
6+ # We use this plugin to validate we can run the tests for it.
7+ "mongo_rules_test.py" : {"uses" : ["mongo" ]},
8+ }
59)
Original file line number Diff line number Diff line change @@ -109,14 +109,14 @@ def platform(
109109 )
110110
111111
112- # TODO: this requires that mongo be running...
113- # def test_is_running(rule_runner: RuleRunner) -> None:
114- # request = UsesMongoRequest()
115- # mock_platform = platform()
116-
117- # we are asserting that this does not raise an exception
118- # is_running = run_mongo_is_running(rule_runner, request, mock_platform)
119- # assert is_running
112+ # Warning this requires that mongo be running
113+ def test_is_running (rule_runner : RuleRunner ) -> None :
114+ request = UsesMongoRequest ()
115+ mock_platform = platform ()
116+
117+ # we are asserting that this does not raise an exception
118+ is_running = run_mongo_is_running (rule_runner , request , mock_platform )
119+ assert is_running
120120
121121
122122@pytest .mark .parametrize (
You can’t perform that action at this time.
0 commit comments