aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'testdata')
-rw-r--r--testdata/data/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/expected.json1
-rw-r--r--testdata/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/DeadUrl-kde-invent-0.ebuild4
-rw-r--r--testdata/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/metadata.xml7
-rw-r--r--testdata/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/responses.py10
4 files changed, 22 insertions, 0 deletions
diff --git a/testdata/data/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/expected.json b/testdata/data/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/expected.json
new file mode 100644
index 00000000..f8f2d77b
--- /dev/null
+++ b/testdata/data/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/expected.json
@@ -0,0 +1 @@
+{"__class__": "DeadUrl", "category": "MetadataUrlCheck", "package": "DeadUrl-kde-invent", "version": "0", "attr": "metadata.xml: remote-id", "url": "https://invent.kde.org/pkgcore/pkgcheck", "message": "404 Client Error: Not Found for url: https://invent.kde.org/pkgcore/pkgcheck"}
diff --git a/testdata/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/DeadUrl-kde-invent-0.ebuild b/testdata/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/DeadUrl-kde-invent-0.ebuild
new file mode 100644
index 00000000..3b5174cb
--- /dev/null
+++ b/testdata/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/DeadUrl-kde-invent-0.ebuild
@@ -0,0 +1,4 @@
+DESCRIPTION="Ebuild with a dead metadata.xml URL"
+HOMEPAGE="https://invent.kde.org/pkgcore/pkgcheck.git/"
+LICENSE="BSD"
+SLOT="0"
diff --git a/testdata/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/metadata.xml b/testdata/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/metadata.xml
new file mode 100644
index 00000000..536ba78f
--- /dev/null
+++ b/testdata/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <remote-id type="kde-invent">pkgcore/pkgcheck</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/testdata/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/responses.py b/testdata/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/responses.py
new file mode 100644
index 00000000..32dade73
--- /dev/null
+++ b/testdata/repos/network/MetadataUrlCheck/DeadUrl-kde-invent/responses.py
@@ -0,0 +1,10 @@
+import io
+
+from requests.models import Response
+
+r = Response()
+r.status_code = 404
+r.reason = "Not Found"
+r.url = "https://invent.kde.org/pkgcore/pkgcheck"
+r.raw = io.StringIO()
+responses = [r]