diff --git a/requirements.txt b/requirements.txt index 0c5c09d1..65d23a8e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,3 +19,4 @@ python-fedora six sqlalchemy systemd-python +vcrpy diff --git a/tests/__init__.py b/tests/__init__.py index 74481b30..603dcb41 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -32,30 +32,6 @@ import module_build_service.pdc app = module_build_service.app conf = init_config(app) -def local_resolve_profiles(pdc_session, mmd, keys): - """ - Returns the default srpm-buildroot and "buildroot" groups as they - would have been return from PDC. - - We are not using real PDC for resolve_profiles in tests, - because it makes tests slower and depending on the remote dev - PDC instance which is not ideal. - """ - default_groups = { - 'srpm-buildroot': - set(['shadow-utils', 'fedora-release', 'redhat-rpm-config', - 'rpm-build', 'fedpkg-minimal', 'gnupg2', 'bash']), - 'buildroot': - set(['unzip', 'fedora-release', 'tar', 'cpio', 'gawk', - 'gcc', 'xz', 'sed', 'findutils', 'util-linux', 'bash', - 'info', 'bzip2', 'grep', 'redhat-rpm-config', - 'diffutils', 'make', 'patch', 'shadow-utils', - 'coreutils', 'which', 'rpm-build', 'gzip', 'gcc-c++'])} - - return default_groups - -module_build_service.pdc.resolve_profiles = local_resolve_profiles - def init_data(): db.session.remove() db.drop_all() diff --git a/tests/test_build/test_build.py b/tests/test_build/test_build.py index ce3488f9..837bc543 100644 --- a/tests/test_build/test_build.py +++ b/tests/test_build/test_build.py @@ -22,7 +22,9 @@ import unittest import koji +import vcr from os import path, mkdir +from os.path import dirname from shutil import copyfile from nose.tools import timed @@ -40,6 +42,8 @@ import json from module_build_service.builder import KojiModuleBuilder, GenericBuilder import module_build_service.scheduler.consumer +base_dir = dirname(dirname(__file__)) +cassette_dir = base_dir + '/vcr-request-data/' class MockedSCM(object): def __init__(self, mocked_scm, name, mmd_filename): @@ -203,6 +207,10 @@ class TestBuild(unittest.TestCase): models.ModuleBuild.query.delete() models.ComponentBuild.query.delete() + filename = cassette_dir + self.id() + self.vcr = vcr.use_cassette(filename) + self.vcr.__enter__() + def tearDown(self): conf.set_item("system", self._prev_system) conf.set_item("num_consecutive_builds", self._prev_num_consencutive_builds) @@ -214,6 +222,7 @@ class TestBuild(unittest.TestCase): del sys.modules['moksha.hub.reactor'] del sys.modules['moksha.hub'] import moksha.hub.reactor + self.vcr.__exit__() @timed(30) @patch('module_build_service.auth.get_username', return_value='Homer J. Simpson') diff --git a/tests/test_scheduler/test_module_wait.py b/tests/test_scheduler/test_module_wait.py index c07b1f2f..7b506a52 100644 --- a/tests/test_scheduler/test_module_wait.py +++ b/tests/test_scheduler/test_module_wait.py @@ -24,7 +24,7 @@ import unittest import mock import module_build_service.messaging import module_build_service.scheduler.handlers.modules - +import modulemd as _modulemd class TestModuleWait(unittest.TestCase): @@ -50,6 +50,9 @@ class TestModuleWait(unittest.TestCase): 'state': 'some state', } + mmd = _modulemd.ModuleMetadata() + mocked_module_build.mmd.return_value = mmd + from_module_event.return_value = mocked_module_build msg = module_build_service.messaging.RidaModule(msg_id=None, module_build_id=1, diff --git a/tests/test_scheduler/test_repo_done.py b/tests/test_scheduler/test_repo_done.py index 096ef6cf..54401585 100644 --- a/tests/test_scheduler/test_repo_done.py +++ b/tests/test_scheduler/test_repo_done.py @@ -20,8 +20,10 @@ # # Written by Ralph Bean +from os.path import dirname import unittest import mock +import vcr import module_build_service.messaging import module_build_service.scheduler.handlers.repos @@ -29,12 +31,21 @@ import module_build_service.models from tests import scheduler_init_data from tests import conf, db +base_dir = dirname(dirname(__file__)) +cassette_dir = base_dir + '/vcr-request-data/' class TestRepoDone(unittest.TestCase): def setUp(self): scheduler_init_data() + filename = cassette_dir + self.id() + self.vcr = vcr.use_cassette(filename) + self.vcr.__enter__() + + def tearDown(self): + self.vcr.__exit__() + @mock.patch('module_build_service.models.ModuleBuild.from_repo_done_event') def test_no_match(self, from_repo_done_event): """ Test that when a repo msg hits us and we have no match, diff --git a/tests/vcr-request-data/tests.test_build.test_build.TestBuild.test_submit_build b/tests/vcr-request-data/tests.test_build.test_build.TestBuild.test_submit_build new file mode 100644 index 00000000..71cc6246 --- /dev/null +++ b/tests/vcr-request-data/tests.test_build.test_build.TestBuild.test_submit_build @@ -0,0 +1,506 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:29 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:30 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=tyEGNtsUoim3k8pfQqftTuF5JrdCLnGD; expires=Thu, 11-Jan-2018 + 10:37:30 GMT; Max-Age=31449600; Path=/', 'sessionid=bhtu6e5m5cvhb9yxlu2ipywh8c90q4ho; + expires=Thu, 26-Jan-2017 10:37:30 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:31 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:32 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=XTBH53Zf7fxz7rcPAPHAtOlXOyZIgB1F; expires=Thu, 11-Jan-2018 + 10:37:32 GMT; Max-Age=31449600; Path=/', 'sessionid=tol31kaee33hqw5ys19o8qb7k1dfcw4t; + expires=Thu, 26-Jan-2017 10:37:32 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:33 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:34 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=QhBAe06GhIMjY5bSwvrdU5YawNSw1zOt; expires=Thu, 11-Jan-2018 + 10:37:34 GMT; Max-Age=31449600; Path=/', 'sessionid=4m1x25j3ptqj2nucz9q66wrftr8mizfy; + expires=Thu, 26-Jan-2017 10:37:34 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:34 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:35 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=zWTox7nd4KxXJ9lMbsd5X4EvqPzKBwKa; expires=Thu, 11-Jan-2018 + 10:37:35 GMT; Max-Age=31449600; Path=/', 'sessionid=lx9e5mpeg4pjpfv8v4j9jdgbveurtkvq; + expires=Thu, 26-Jan-2017 10:37:35 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:36 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:37 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=Pj759tMTCvN5Gh1aq34njcw3fs2A6BJu; expires=Thu, 11-Jan-2018 + 10:37:37 GMT; Max-Age=31449600; Path=/', 'sessionid=qxwjzhrhzlyn95wg0j9u0n4kfs438mhf; + expires=Thu, 26-Jan-2017 10:37:37 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:37 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:38 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=pGNb5qnVy5D11zoHJYtv1kgMIL4N6QuP; expires=Thu, 11-Jan-2018 + 10:37:38 GMT; Max-Age=31449600; Path=/', 'sessionid=4fzywpb68h51wnw0j6aeabw54alvw2hp; + expires=Thu, 26-Jan-2017 10:37:38 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:39 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:40 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=6gKKa8HlU5Wsv36r1qVPn2XKf9Hwy84h; expires=Thu, 11-Jan-2018 + 10:37:40 GMT; Max-Age=31449600; Path=/', 'sessionid=ousofqe4ig07usjb8ig0tvd0yknytzaq; + expires=Thu, 26-Jan-2017 10:37:40 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:40 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:41 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=UtOkuhqOp9rZJnP8Pfe3z262TRzao70h; expires=Thu, 11-Jan-2018 + 10:37:41 GMT; Max-Age=31449600; Path=/', 'sessionid=mhbyvogoknaga1yxn8sbhr7gvlbq5dv3; + expires=Thu, 26-Jan-2017 10:37:41 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:42 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:42 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=DimuoEvPVtKJENQgqBI4wNyajI4JAJJZ; expires=Thu, 11-Jan-2018 + 10:37:42 GMT; Max-Age=31449600; Path=/', 'sessionid=fbn8nda1n715v3rivev6f86qc65ybsfq; + expires=Thu, 26-Jan-2017 10:37:42 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/vcr-request-data/tests.test_build.test_build.TestBuild.test_submit_build_cancel b/tests/vcr-request-data/tests.test_build.test_build.TestBuild.test_submit_build_cancel new file mode 100644 index 00000000..af22a659 --- /dev/null +++ b/tests/vcr-request-data/tests.test_build.test_build.TestBuild.test_submit_build_cancel @@ -0,0 +1,226 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:44 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:45 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=6Qxyo8NXtITCc2YiJf5M2MAXfhBxpaBi; expires=Thu, 11-Jan-2018 + 10:37:45 GMT; Max-Age=31449600; Path=/', 'sessionid=oogbdb99pbsf9yryffdrbnmpuygki5l4; + expires=Thu, 26-Jan-2017 10:37:45 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:45 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:46 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=gagPouNG6feK2Jd86ZCv55PDouwOwY5p; expires=Thu, 11-Jan-2018 + 10:37:46 GMT; Max-Age=31449600; Path=/', 'sessionid=n2usoosxj2c073cotvp3plhjihwc42yl; + expires=Thu, 26-Jan-2017 10:37:46 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:47 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:47 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=I00ULEIWIBBFzCeyHRVts4Dk4gDaYsFq; expires=Thu, 11-Jan-2018 + 10:37:47 GMT; Max-Age=31449600; Path=/', 'sessionid=gsna9poqaofx5islnvwg6wigtulcxgfd; + expires=Thu, 26-Jan-2017 10:37:47 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:48 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:49 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=gHsPmCL7PZ2C4yxVTLmjEOLm5t8bcDGB; expires=Thu, 11-Jan-2018 + 10:37:49 GMT; Max-Age=31449600; Path=/', 'sessionid=yafpxepzcgje930oadei830lx2ct0bva; + expires=Thu, 26-Jan-2017 10:37:49 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/vcr-request-data/tests.test_build.test_build.TestBuild.test_submit_build_concurrent_threshold b/tests/vcr-request-data/tests.test_build.test_build.TestBuild.test_submit_build_concurrent_threshold new file mode 100644 index 00000000..70e4b06e --- /dev/null +++ b/tests/vcr-request-data/tests.test_build.test_build.TestBuild.test_submit_build_concurrent_threshold @@ -0,0 +1,506 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:51 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:51 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=dyYqw5OK59DaGvsuSLOckKjFNCZmet2K; expires=Thu, 11-Jan-2018 + 10:37:51 GMT; Max-Age=31449600; Path=/', 'sessionid=gff9blh1dhpeeug6jpakfzkl6z0gxo8g; + expires=Thu, 26-Jan-2017 10:37:51 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:52 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:53 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=waR84663mQUfnNzMhRzat9EWKbnEGESa; expires=Thu, 11-Jan-2018 + 10:37:53 GMT; Max-Age=31449600; Path=/', 'sessionid=qmtf4n7gz50dtlgijfi8eus6zxoxze6t; + expires=Thu, 26-Jan-2017 10:37:53 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:53 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:54 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=NQN5sMarQpFmjxkdxOFHIB79ZRUASPnO; expires=Thu, 11-Jan-2018 + 10:37:54 GMT; Max-Age=31449600; Path=/', 'sessionid=qw7xkyp5zdfzck8gjeejz8nf2dab40m0; + expires=Thu, 26-Jan-2017 10:37:54 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:54 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:55 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=Pwny8ExsUvWXxQuBAfDv2L0B8smNKbA5; expires=Thu, 11-Jan-2018 + 10:37:55 GMT; Max-Age=31449600; Path=/', 'sessionid=htw4f3fxckraiixou0kr3n5sod7dvtmi; + expires=Thu, 26-Jan-2017 10:37:55 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:55 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:56 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=f41CtE0qG1G1cER1z3qA5gDwB5NGGd3I; expires=Thu, 11-Jan-2018 + 10:37:56 GMT; Max-Age=31449600; Path=/', 'sessionid=ng5yn5cza9dcnjrd26etuyvvgt2ebjsu; + expires=Thu, 26-Jan-2017 10:37:56 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:57 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:58 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=FrtMghs7QeLpImrMhGvpwuzZYY4V3jhK; expires=Thu, 11-Jan-2018 + 10:37:58 GMT; Max-Age=31449600; Path=/', 'sessionid=0e0kzmfi310l5cdsyawa6evr12vnjuze; + expires=Thu, 26-Jan-2017 10:37:58 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:37:59 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:37:59 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=b3EYsuvc5qaQCvM7HdEKs7fR2ZPGwN6v; expires=Thu, 11-Jan-2018 + 10:37:59 GMT; Max-Age=31449600; Path=/', 'sessionid=gkovv54svqtaqprgtih61xnf1v3wenyh; + expires=Thu, 26-Jan-2017 10:37:59 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:38:01 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:38:01 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=1i5QzIxstIe4A1vtJdN7Mo3onnBpmbxj; expires=Thu, 11-Jan-2018 + 10:38:01 GMT; Max-Age=31449600; Path=/', 'sessionid=m7gmfzygqzx69fuxl3kwznue536ijdf0; + expires=Thu, 26-Jan-2017 10:38:01 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:38:02 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:38:03 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=WtjAs6G0PqsQAtpzzkQO11KNAYjhcy8l; expires=Thu, 11-Jan-2018 + 10:38:03 GMT; Max-Age=31449600; Path=/', 'sessionid=0fuv0uvmdyadi5ia5ob2xsfe0yx7ntjc; + expires=Thu, 26-Jan-2017 10:38:03 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/vcr-request-data/tests.test_build.test_build.TestBuild.test_submit_build_instant_complete b/tests/vcr-request-data/tests.test_build.test_build.TestBuild.test_submit_build_instant_complete new file mode 100644 index 00000000..2ba085ca --- /dev/null +++ b/tests/vcr-request-data/tests.test_build.test_build.TestBuild.test_submit_build_instant_complete @@ -0,0 +1,282 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:38:05 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:38:06 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=bpnemVSKtIj5qBNO3afW8iRgI3GCHXts; expires=Thu, 11-Jan-2018 + 10:38:06 GMT; Max-Age=31449600; Path=/', 'sessionid=s9zhmby4e1sw9jvvefl8nnxk6ogvj0ff; + expires=Thu, 26-Jan-2017 10:38:06 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:38:07 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:38:08 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=5360uB74rel8yBAEgQTPpeNsEY9XGSR0; expires=Thu, 11-Jan-2018 + 10:38:08 GMT; Max-Age=31449600; Path=/', 'sessionid=k1z9fze4f665afdqvysr5xwoggn371w0; + expires=Thu, 26-Jan-2017 10:38:08 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:38:09 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:38:09 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=RVz7eNfx3tyoYfBL1vl1vyWj5uxucqap; expires=Thu, 11-Jan-2018 + 10:38:09 GMT; Max-Age=31449600; Path=/', 'sessionid=hw10cbhbsamt07yjbi89xgg8ecbpvelb; + expires=Thu, 26-Jan-2017 10:38:09 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:38:10 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:38:11 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=kHJgn8H8z0WZu5BNBvTNLIMetvdxieQP; expires=Thu, 11-Jan-2018 + 10:38:11 GMT; Max-Age=31449600; Path=/', 'sessionid=fdanci9im30w6l5syddjqqgd9t8ra10x; + expires=Thu, 26-Jan-2017 10:38:11 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:38:11 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:38:12 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=pDDTFDDiWa9xvKvKBeDF9vNZBbCe6TbP; expires=Thu, 11-Jan-2018 + 10:38:12 GMT; Max-Age=31449600; Path=/', 'sessionid=1e1oo5wxsu1hvlb1is6sf9uziagacwlo; + expires=Thu, 26-Jan-2017 10:38:12 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/vcr-request-data/tests.test_scheduler.test_repo_done.TestRepoDone.test_a_single_match b/tests/vcr-request-data/tests.test_scheduler.test_repo_done.TestRepoDone.test_a_single_match new file mode 100644 index 00000000..fa1c25c6 --- /dev/null +++ b/tests/vcr-request-data/tests.test_scheduler.test_repo_done.TestRepoDone.test_a_single_match @@ -0,0 +1,58 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:42:02 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:42:03 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=F8Q1L8iQTVRIwZt9grZ3P3hvqomRUaK2; expires=Thu, 11-Jan-2018 + 10:42:03 GMT; Max-Age=31449600; Path=/', 'sessionid=9tni9905j6c5ihm5o38onicnpks1glji; + expires=Thu, 26-Jan-2017 10:42:03 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/vcr-request-data/tests.test_scheduler.test_repo_done.TestRepoDone.test_a_single_match_build_fail b/tests/vcr-request-data/tests.test_scheduler.test_repo_done.TestRepoDone.test_a_single_match_build_fail new file mode 100644 index 00000000..ce71b0f5 --- /dev/null +++ b/tests/vcr-request-data/tests.test_scheduler.test_repo_done.TestRepoDone.test_a_single_match_build_fail @@ -0,0 +1,58 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode ''} + headers: + content-type: [text/html; charset=utf-8] + date: ['Thu, 12 Jan 2017 10:42:04 GMT'] + location: ['http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime'] + server: [WSGIServer/0.1 Python/2.7.12] + x-frame-options: [SAMEORIGIN] + status: {code: 301, message: MOVED PERMANENTLY} +- request: + body: null + headers: + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python-requests/2.10.0] + accept: [application/json] + content-type: [application/json] + method: GET + uri: http://modularity.fedorainfracloud.org:8080/rest_api/v1/unreleasedvariants/?variant_version=master&page_size=-1&variant_id=base-runtime + response: + body: {string: !!python/unicode '[{"variant_id":"base-runtime","variant_uid":"base-runtime-master-3","variant_name":"base-runtime","variant_type":"module","variant_version":"master","variant_release":"3","koji_tag":"module-base-runtime-master-3","modulemd":"document: + modulemd\r\nversion: 1\r\ndata:\r\n name: base-runtime\r\n stream: master\r\n version: + 3\r\n summary: A fake base-runtime module, used to bootstrap the infrastructure.\r\n description: + ...\r\n profiles:\r\n buildroot:\r\n rpms:\r\n - + bash\r\n - bzip2\r\n - coreutils\r\n - + cpio\r\n - diffutils\r\n - fedora-release\r\n - + findutils\r\n - gawk\r\n - gcc\r\n - + gcc-c++\r\n - grep\r\n - gzip\r\n - + info\r\n - make\r\n - patch\r\n - + redhat-rpm-config\r\n - rpm-build\r\n - sed\r\n - + shadow-utils\r\n - tar\r\n - unzip\r\n - + util-linux\r\n - which\r\n - xz\r\n srpm-buildroot:\r\n rpms:\r\n - + bash\r\n - fedora-release\r\n - fedpkg-minimal\r\n - + gnupg2\r\n - redhat-rpm-config\r\n - rpm-build\r\n - + shadow-utils","runtime_deps":[],"build_deps":[]}]'} + headers: + allow: ['GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS'] + content-type: [application/json] + date: ['Thu, 12 Jan 2017 10:42:05 GMT'] + server: [WSGIServer/0.1 Python/2.7.12] + set-cookie: ['csrftoken=RHZQGCRNy5WVlgOS8DJQquFgzUz2fMCz; expires=Thu, 11-Jan-2018 + 10:42:05 GMT; Max-Age=31449600; Path=/', 'sessionid=6lb37nfrlhvxdt3i9h9lzuu8b7zyxstd; + expires=Thu, 26-Jan-2017 10:42:05 GMT; httponly; Max-Age=1209600; Path=/'] + vary: ['Accept, Cookie'] + x-frame-options: [SAMEORIGIN] + status: {code: 200, message: OK} +version: 1