Skip to content

Test rework #448

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

Merged
merged 17 commits into from
Feb 9, 2019
Merged

Test rework #448

merged 17 commits into from
Feb 9, 2019

Conversation

adorton-adobe
Copy link
Collaborator

@adorton-adobe adorton-adobe commented Feb 8, 2019

We're overhauling the User Sync Tool's testing infrastructure.

Rationale:

  • pytest is preferable to nose - much simpler to use and powerful, flexible fixture system
  • Testing framework for black box tests is confusing, difficult to use and doesn't integrate with CI systems
  • 99% of what we can do in the black-box framework can be done as unit tests (by targeting app.main(), the entrypoint used by the pex build)

Changes in this update:

  • Remove old tests/ directory (if needed, can get old tests in v2.4)
  • Remove test_framework/ (any components we might need can be obtained in v2.4)
  • Define a few new tests in tests/ directory
  • Update setup and test dependencies in setup.py
  • Configure to run pytest with python setup.py test
  • Enable coverage reporting
  • Fixture files for base config files
  • Define fixtures to get base fixture directory and to get & modify base config files
  • Refactor LDAP connector to isolate configuration option handling so we can test it
  • Modify CI config and scripts to run tests

Rough roadmap:

  • Define fixtures to mock UMAPI (we'll probably want to use the vcr.py-based mock server from the old test_framework)
  • Define fixtures to mock LDAP (once we switch to ldap3 as per Switch to ldap3 #436, we can use its mock LDAP server)
  • Create a few tests that run the pex file to make sure the build succeeds. We'll need to integrate this with the CI builds and make these tests optional to run locally

Fixes #449

Copy link
Contributor

@adobeDan adobeDan left a comment

Choose a reason for hiding this comment

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

Yay! Great direction to move!

@adorton-adobe adorton-adobe merged commit 47e31b6 into v2 Feb 9, 2019
@adorton-adobe adorton-adobe deleted the feature/test-rework branch April 8, 2022 15:59
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.

Rework tests
2 participants