Skip to content

Commit

Permalink
tests: Fix the tests for the broken links
Browse files Browse the repository at this point in the history
Signed-off-by: Sayan Chowdhury <sayan.chowdhury2012@gmail.com>
  • Loading branch information
sayanchowdhury committed Jul 25, 2018
1 parent 126e4ea commit cec9b0a
Show file tree
Hide file tree
Showing 3 changed files with 1,830 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/test_consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,25 +120,26 @@ def test_success_upload(self, upload):
"msg": {
"status": "FINISHED",
"release_type": "ga",
"compose_label": "RC-20180317.0",
"compose_label": "RC-20180425.0",
"compose_respin": 0,
"compose_date": "20180317",
"release_version": "27",
"location": "http://kojipkgs.fedoraproject.org/compose/Fedora-Cloud-27-20180317.0/compose",
"compose_date": "20180425",
"release_version": "28",
"location": "https://kojipkgs.fedoraproject.org/compose/28/latest-Fedora-28/compose",
"compose_type": "production",
"release_is_layered": False,
"release_name": "Fedora-Cloud",
"release_short": "Fedora-Cloud",
"compose_id": "Fedora-Cloud-27-20180317.0"
"compose_id": "Fedora-28-20180425.0"
}
}
}

self.consumer.consume(msg)
url = 'http://kojipkgs.fedoraproject.org/compose/Fedora-Cloud-27-20180317.0/compose/CloudImages/x86_64/images/Fedora-Cloud-Base-27-20180317.0.x86_64.raw.xz'
url = 'https://kojipkgs.fedoraproject.org/compose/28/latest-Fedora-28/compose/Cloud/x86_64/images/Fedora-Cloud-Base-28-1.1.x86_64.raw.xz'
url1 = 'https://kojipkgs.fedoraproject.org/compose/28/latest-Fedora-28/compose/AtomicHost/x86_64/images/Fedora-AtomicHost-28-1.1.x86_64.raw.xz'
upload.assert_called_with(
pool=mock.ANY,
urls=[url],
compose_id='Fedora-Cloud-27-20180317.0',
urls=[url, url1],
compose_id='Fedora-28-20180425.0',
push_notifications=True
)
Original file line number Diff line number Diff line change
Expand Up @@ -465,4 +465,84 @@ interactions:
x-frame-options: [SAMEORIGIN]
x-xss-protection: [1; mode=block]
status: {code: 404, message: Not Found}
- request:
body: null
headers:
Connection: [close]
Host: [!!python/unicode 'kojipkgs.fedoraproject.org']
User-Agent: [Python-urllib/2.7]
method: GET
uri: https://kojipkgs.fedoraproject.org/compose/rawhide/Fedora-Rawhide-20180426.n.0/compose/metadata/composeinfo.json
response:
body: {string: !!python/unicode '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>404 Not Found</title>

</head><body>

<h1>Not Found</h1>

<p>The requested URL /compose/rawhide/Fedora-Rawhide-20180426.n.0/compose/metadata/composeinfo.json
was not found on this server.</p>

</body></html>

'}
headers:
appserver: [proxy10.phx2.fedoraproject.org]
apptime: [D=14735]
connection: [close]
content-length: ['275']
content-type: [text/html; charset=iso-8859-1]
date: ['Tue, 24 Jul 2018 20:44:01 GMT']
referrer-policy: [same-origin]
server: [Apache/2.4.33 (Fedora)]
strict-transport-security: [max-age=31536000; includeSubDomains; preload, max-age=31536000;
includeSubDomains; preload]
x-content-type-options: [nosniff]
x-frame-options: [SAMEORIGIN]
x-xss-protection: [1; mode=block]
status: {code: 404, message: Not Found}
- request:
body: null
headers:
Connection: [close]
Host: [!!python/unicode 'kojipkgs.fedoraproject.org']
User-Agent: [Python-urllib/2.7]
method: GET
uri: https://kojipkgs.fedoraproject.org/compose/rawhide/Fedora-Rawhide-20180426.n.0/compose/metadata/composeinfo.json
response:
body: {string: !!python/unicode '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>404 Not Found</title>

</head><body>

<h1>Not Found</h1>

<p>The requested URL /compose/rawhide/Fedora-Rawhide-20180426.n.0/compose/metadata/composeinfo.json
was not found on this server.</p>

</body></html>

'}
headers:
appserver: [proxy01.phx2.fedoraproject.org]
apptime: [D=3433]
connection: [close]
content-length: ['275']
content-type: [text/html; charset=iso-8859-1]
date: ['Tue, 24 Jul 2018 20:48:20 GMT']
referrer-policy: [same-origin]
server: [Apache/2.4.33 (Fedora)]
strict-transport-security: [max-age=31536000; includeSubDomains; preload, max-age=31536000;
includeSubDomains; preload]
x-content-type-options: [nosniff]
x-frame-options: [SAMEORIGIN]
x-xss-protection: [1; mode=block]
status: {code: 404, message: Not Found}
version: 1

0 comments on commit cec9b0a

Please sign in to comment.