Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit and regression tests for validation #300

Merged
merged 1 commit into from
Nov 24, 2023
Merged

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Nov 22, 2023

Description

This adds code and data to perform detailed regression testing on the commands validation code.

By definition the tests are passing now on my Mac since the same code is used to generate the regression data as for doing the test.

Interface impacts

None

Testing

Unit tests

  • Mac (ska3-performance)
  • Linux (kady in /export/jgonzale/github-workflows/miniconda3/envs/ska3-masters/)
(ska3-perf) ➜  kadi git:(validate-unit-test) git rev-parse HEAD                                     
624e7bd13dfe0e0cd824a0bdc5f800893b30009a

(ska3-perf) ➜  kadi git:(validate-unit-test) pytest kadi
==================================================== test session starts ====================================================
platform darwin -- Python 3.10.8, pytest-7.2.1, pluggy-1.0.0
rootdir: /Users/aldcroft/git, configfile: pytest.ini
plugins: timeout-2.1.0, anyio-3.6.2
collected 218 items                                                                                                         

kadi/commands/tests/test_commands.py ...........................................................................      [ 34%]
kadi/commands/tests/test_states.py ......................x.............................................x............. [ 72%]
..........                                                                                                            [ 76%]
kadi/commands/tests/test_validate.py ...................                                                              [ 85%]
kadi/tests/test_events.py ..........                                                                                  [ 89%]
kadi/tests/test_occweb.py ......................                                                                      [100%]

======================================== 216 passed, 2 xfailed in 129.04s (0:02:09) =========================================

Independent check of unit tests by Jean

  • Linux

Functional tests

No functional testing.

@taldcroft taldcroft requested a review from jeanconn November 22, 2023 16:00
Copy link
Contributor

@jeanconn jeanconn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I wonder overall if we need kadi to have a test setup that locks down any relevant env vars, but it seems like there are no use cases for persistent env vars that are non-standard so they shouldn't be hanging around with weird values.

@taldcroft taldcroft merged commit 2de586d into master Nov 24, 2023
4 checks passed
@taldcroft taldcroft deleted the validate-unit-test branch November 24, 2023 18:28
@javierggt javierggt mentioned this pull request Dec 5, 2023
@javierggt javierggt mentioned this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants