[PATCH] gnu: python-lint-cfn: Fix non-reproducible test suite

  • Done
  • quality assurance status badge
Details
2 participants
  • Ryan Sundberg
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Ryan Sundberg
Severity
normal

Debbugs page

Ryan Sundberg wrote 4 years ago
(address . guix-patches@gnu.org)(name . Ryan Sundberg)(address . ryan@arctype.co)
20210611041233.19012-1-ryan@arctype.co
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
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

Toggle diff (67 lines)
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
Sharlatan Hellseher wrote 4 weeks ago
(address . 48954-done@debbugs.gnu.org)
87seomvu14.fsf@gmail.com
Hi,

Thank you for your efforts to fix tests, they are already adjusted in
these commits:

63547f5c50c gnu: python-cfn-lint: Update to 1.22.1.
35c92a63245 gnu: python-cfn-lint: Update to 0.65.0.
dbf5d938c54 gnu: python-cfn-lint: Honor #:tests? flag.
f3416ebc2e0 gnu: python-cfn-lint: Update to 0.54.3.
ca9f5de1e4a gnu: python-cfn-lint: Update to 0.54.1.
35b31a18bee gnu: python-cfn-lint: Update to 0.51.0.

Closing as not applied.

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmep9zcACgkQdtcnv/Ys
0rVXpg/+K8zh/qTTUoYvGTeUnkP43CjuNz5LkvwChTu8PX67770124PPko4vnV5Z
6nlog5R46rz2HT4XA1aWc/q7tRZU7oeznvyZzshh0nJxwBfOHhxCYM6J1YYJs5v+
oNYxF7t9SxCHkTDy/gTHgSCCB2yO8UVOt6Ldf//W8To+3J8/59Ll+goR7Wl+LJpw
kTl0LNJSVerv7+qbw9rE3FTeOdkEPsqvO10DsEDgkbmTfh/+DjcwlEUQnBWGeYkY
NW0YYwqHmsJbQY2Mz3h91koB1EPrWuUn7XQsqpnGGjIcw0oA9fiLFL6sSjZM6YUl
lrg0f5UHui0NM3KaoFmCMtbllONrjzUB0xe8jJ8s35KzTGftQ39xaYsZ55rfGnMq
dfPBfw5Nde1Pffb5hdgWOhc0kKrYfphMglGZ52KVEVVBSS3bpjkRwPcc0zXss6G0
WOz6qgRSlHGlMcKAm6ymSLehfEXnHVKh3DVOwqWfdDit84SY9BG5PIrfDOaBbFzF
dRR6yi8hLb4Xb8cLPx3XoK3l0aZM0+igJDm8JLqjpirABQAIBuU2hAoRvh4xuMaT
jiCbNE1AZvM43Zxkvomyr0x2SpnZFDecDGSS8Rcc/kQ/jW0KNmR9nrPzO6/QYREq
CKDTUrLNacRL1gMpNEv1Juclx/OgCweX0h2YeY/vGclfImyM19w=
=RanM
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 48954@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 48954
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help