From: Ryan Sundberg via Guix-patches via <guix-patches@gnu.org>
To: 48954@debbugs.gnu.org
Cc: Ryan Sundberg <ryan@arctype.co>
Subject: [bug#48954] [PATCH] gnu: python-lint-cfn: Fix non-reproducible test suite
Date: Thu, 10 Jun 2021 21:12:33 -0700 [thread overview]
Message-ID: <20210611041233.19012-1-ryan@arctype.co> (raw)
Some tests for python-cfn-lint are dependent on the date the tests are run,
which can cause the tests to spontaneously start failing. See
https://github.com/aws-cloudformation/cfn-lint/issues/1705 for the upstream
discssion. This patch removes the unstable test cases.
* gnu/packages/python-web.scm: Patch python-cfn-lint tests
Signed-off-by: Ryan Sundberg <ryan@arctype.co>
---
...n-lint-disable-nonreproducible-tests.patch | 42 +++++++++++++++++++
gnu/packages/python-web.scm | 6 ++-
2 files changed, 47 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/python-cfn-lint-disable-nonreproducible-tests.patch
diff --git a/gnu/packages/patches/python-cfn-lint-disable-nonreproducible-tests.patch b/gnu/packages/patches/python-cfn-lint-disable-nonreproducible-tests.patch
new file mode 100644
index 0000000000..e9fb1bda45
--- /dev/null
+++ b/gnu/packages/patches/python-cfn-lint-disable-nonreproducible-tests.patch
@@ -0,0 +1,42 @@
+diff --git a/test/integration/test_quickstart_templates.py b/test/integration/test_quickstart_templates.py
+index 41058b29..d859b6d1 100644
+--- a/test/integration/test_quickstart_templates.py
++++ b/test/integration/test_quickstart_templates.py
+@@ -59,16 +59,6 @@ class TestQuickStartTemplates(BaseCliTestCase):
+ 'filename': 'test/fixtures/templates/quickstart/openshift_master.yaml',
+ 'results_filename': 'test/fixtures/results/quickstart/openshift_master.json',
+ 'exit_code': 8,
+- },
+- {
+- 'filename': 'test/fixtures/templates/quickstart/openshift.yaml',
+- 'results_filename': 'test/fixtures/results/quickstart/openshift.json',
+- 'exit_code': 14,
+- },
+- {
+- 'filename': 'test/fixtures/templates/quickstart/cis_benchmark.yaml',
+- 'results_filename': 'test/fixtures/results/quickstart/cis_benchmark.json',
+- 'exit_code': 6,
+ }
+ ]
+
+diff --git a/test/integration/test_quickstart_templates_non_strict.py b/test/integration/test_quickstart_templates_non_strict.py
+index 7372fb0b..85637c91 100644
+--- a/test/integration/test_quickstart_templates_non_strict.py
++++ b/test/integration/test_quickstart_templates_non_strict.py
+@@ -19,16 +19,6 @@ class TestQuickStartTemplates(BaseCliTestCase):
+ 'filename': 'test/fixtures/templates/quickstart/nist_application.yaml',
+ 'results_filename': 'test/fixtures/results/quickstart/non_strict/nist_application.json',
+ 'exit_code': 12,
+- },
+- {
+- 'filename': 'test/fixtures/templates/quickstart/openshift.yaml',
+- 'results_filename': 'test/fixtures/results/quickstart/non_strict/openshift.json',
+- 'exit_code': 12,
+- },
+- {
+- 'filename': 'test/fixtures/templates/quickstart/cis_benchmark.yaml',
+- 'results_filename': 'test/fixtures/results/quickstart/non_strict/cis_benchmark.json',
+- 'exit_code': 4,
+ }
+ ]
+
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 1d65b2b0a8..9c05052a7d 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -475,7 +475,11 @@ emit information from within their applications to the AWS X-Ray service.")
(file-name (git-file-name name version))
(sha256
(base32
- "0nqs0fmj3hd7pnd9hkb4z57jvi2iv82hh6n3xxba6i6p8zgx75q4"))))
+ "0nqs0fmj3hd7pnd9hkb4z57jvi2iv82hh6n3xxba6i6p8zgx75q4"))
+ ;; Some test cases for this program are dependent on the date the
+ ;; tests are run. Disable those tests.
+ ;; See https://github.com/aws-cloudformation/cfn-lint/issues/1705
+ (patches (search-patches "python-cfn-lint-disable-nonreproducible-tests.patch"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
--
2.31.1
reply other threads:[~2021-06-11 4:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210611041233.19012-1-ryan@arctype.co \
--to=guix-patches@gnu.org \
--cc=48954@debbugs.gnu.org \
--cc=ryan@arctype.co \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.