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

tests: automated testing w/ github actions and state update component tests #109

Closed
wants to merge 4 commits into from

Conversation

sskaur
Copy link
Contributor

@sskaur sskaur commented Apr 25, 2023

Relevant Changes

  • Added event to trigger graceful stop to periodic updates thread on shutdown before forced stop. This is also useful for testing.
  • Organized tests folder into subfolders for functional tests (rely on Ceph/SPDK) and component tests. This solves import issues for pytest when running in isolated environments.
  • Added 16 state update tests to tests/component/test_state.py
  • Github action to automate test runs

Tests

For the following, "valid" keys refer to keys with one of the established prefix constants.

  1. No change between local and omap
  2. Invalid key addition
  3. Multiple key additions of one valid prefix
  4. Key additions of every valid prefix
  5. Key removal of invalid prefix
  6. Multiple key removals of one valid prefix
  7. Key removals of every valid prefix
  8. Value change on key of invalid prefix
  9. Multiple value changes on keys of a single valid prefix
  10. Value changes on keys of every valid prefix
  11. Confirm reset of local state after state update
  12. Confirm reset of local version after state update
  13. Confirm lack of update when local version == omap_version
  14. Confirm lack of update when local version > omap_version
  15. Confirm periodic call for update
  16. Confirm notify event interrupts periodic call for update

@sskaur sskaur force-pushed the starter-component-tests branch from 20c4948 to c0a90ce Compare April 26, 2023 19:04
@sskaur sskaur requested a review from epuertat April 26, 2023 19:04
@epuertat epuertat added the test label May 10, 2023
@sskaur sskaur force-pushed the starter-component-tests branch from c0a90ce to 324694e Compare May 11, 2023 15:54
@sskaur sskaur marked this pull request as draft May 11, 2023 15:54
@sskaur sskaur force-pushed the starter-component-tests branch from 324694e to 1d82a37 Compare May 11, 2023 16:04
@sskaur sskaur changed the title tests: state update component tests tests: automated testing w/ github actions and state update component tests May 15, 2023
@sskaur sskaur force-pushed the starter-component-tests branch from 1d82a37 to ae70391 Compare May 22, 2023 13:38
@sskaur sskaur marked this pull request as ready for review May 22, 2023 13:39
@sskaur
Copy link
Contributor Author

sskaur commented May 22, 2023

@epuertat As we now have #134, I can remove the github action from this PR if needed. Let me know what you think.

@epuertat
Copy link
Member

@epuertat As we now have #134, I can remove the github action from this PR if needed. Let me know what you think.

@sskaur for unit-test specifically, I'd prefer this Github action.

@baum what do you think about it?

@baum
Copy link
Collaborator

baum commented May 23, 2023

@epuertat we still might need action for the

@epuertat As we now have #134, I can remove the github action from this PR if needed. Let me know what you think.

@sskaur for unit-test specifically, I'd prefer this Github action.

@baum what do you think about it?

@epuertat #134 covers functional tests, if component tests are are designed in a unit-style, meaning they don't require running a Ceph cluster or similar components then component tests would use a different runtime and therefore a separate GitHub action might be reasonable.

@caroav
Copy link
Collaborator

caroav commented Aug 24, 2023

@baum please review and advise.

@baum
Copy link
Collaborator

baum commented Sep 4, 2023

@baum please review and advise.

This pull request requires rebasing against the latest changes in the 'devel' branch. Additionally, there seem to be modifications in the implementation of omap state, particularly in 'control/state.py' and 'control/server.py'.

@sskaur 🖖, I could help integrate 'tests/component/test_state.py' into the existing CI pytest matrix. Please let me know your preferred way to proceed.

This commit establishes a test subdirectory for functional tests, which
rely on libRADOS and SPDK.

Signed-off-by: Sandy Kaur <[email protected]>
@sskaur sskaur force-pushed the starter-component-tests branch from ae70391 to 931a7a5 Compare September 20, 2023 14:58
@epuertat epuertat removed their request for review September 20, 2023 16:49
@baum baum closed this Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants