File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,12 +30,15 @@ class TestCommand(Command):
3030 "This will also be very slow." ),
3131 ("only=" , None ,
3232 "Run only tests whose name contains the passed string" ),
33+ ("redhat-url=" , None ,
34+ "Redhat bugzilla URL to use for ro/rw_functional tests" ),
3335 ]
3436
3537 def initialize_options (self ):
3638 self .ro_functional = False
3739 self .rw_functional = False
3840 self .only = None
41+ self .redhat_url = None
3942
4043 def finalize_options (self ):
4144 pass
@@ -76,6 +79,9 @@ def run(self):
7679 except :
7780 print ("installHandler hack failed" )
7881
82+ import tests as testsmodule
83+ testsmodule .REDHAT_URL = self .redhat_url
84+
7985 tests = unittest .TestLoader ().loadTestsFromNames (testfiles )
8086 if self .only :
8187 newtests = []
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ def _cleanup_cb():
3131atexit .register (_cleanup_cb )
3232bugzillascript = _import ("bugzillascript" , "bin/bugzilla" )
3333
34+ # This is overwritten by python setup.py test --redhat-url, and then
35+ # used in ro/rw tests
36+ REDHAT_URL = None
3437
3538
3639def diff (orig , new ):
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ class BZFDO(BaseTest):
156156
157157
158158class RHTest (BaseTest ):
159- url = "https://bugzilla.redhat.com/xmlrpc.cgi"
159+ url = tests . REDHAT_URL or "https://bugzilla.redhat.com/xmlrpc.cgi"
160160 bzclass = bugzilla .RHBugzilla
161161
162162 test0 = BaseTest ._testBZClass
Original file line number Diff line number Diff line change @@ -65,8 +65,7 @@ class RHPartnerTest(BaseTest):
6565 # Despite its name, this instance is simply for bugzilla testing,
6666 # doesn't send out emails and is blown away occasionally. The front
6767 # page has some info.
68- url = "https://partner-bugzilla.redhat.com/xmlrpc.cgi"
69- # url = "https://bzweb01-devel.app.eng.rdu.redhat.com/"
68+ url = tests .REDHAT_URL or "https://partner-bugzilla.redhat.com/xmlrpc.cgi"
7069 bzclass = bugzilla .RHBugzilla
7170
7271
You can’t perform that action at this time.
0 commit comments