#461 use port number in allowed_scms
Closed by tkopecek. Opened by tkopecek.
tkopecek/koji issue428  into  master

Download 461.patch

Related: https://pagure.io/koji/issue/428

I'm still not sure how best to address this.

This particular change has some issues. There's a typo that breaks things, but more importantly, it doesn't seem to honor the [:port] correctly when I extend the test case.

https://github.com/mikem23/koji-playground/commits/issue428

$ PYTHONPATH=hub/.:plugins/hub/.:plugins/builder/. /usr/bin/nosetests tests/test_scm.py
E............
======================================================================
ERROR: test_allowed (tests.test_scm.TestSCM)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "/home/mike/Devel/koji/koji/tests/test_scm.py", line 91, in test_allowed
    scm.assert_allowed(config)
  File "/home/mike/Devel/koji/koji/koji/daemon.py", line 386, in assert_allowed
    % (self._host_with_port(), self.repository))
BuildError: portserver:7999:/path1 is not in the list of allowed SCMs
----------------------------------------------------------------------
Ran 13 tests in 0.018s
FAILED (errors=1)

Fixed port variable handling.

3 new commits added

  • Fixed port handling
  • add scm test values for ports
  • fix typo in _host_with_port

rebased onto 5a9a20c9ed5343140cc0b675e2fddbb49c4236c3

rebased onto 968363ef6a0ea8888e00e0b4bcf80aab78987f4e

rebased onto 5a9a20c9ed5343140cc0b675e2fddbb49c4236c3

@tkopecek no activity on this PR or corresponding issue in two years. Let's close

Pull-Request has been closed by tkopecek

Metadata