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

Integration tests for certificate policy manager #753

Merged
merged 8 commits into from
Aug 2, 2023

Commits on Jul 31, 2023

  1. Infer needed directories from given state directory

    Instead of having defaults for all needed directories in the certificate
    Python script, only make the state directory overridable since the
    others are descendants of it.
    
    This will ease integration testing as we will only need to expose the
    state directory and the global trust directory.
    GabrielNagy committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    45d326c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ee1209d View commit details
    Browse the repository at this point in the history
  3. Make global trust and state dirs configurable

    To aid in integration tests, these must be editable via the
    configuration file.
    GabrielNagy committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    f826c9a View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2023

  1. Append to PYTHONPATH instead of overriding

    To be able to use the samba mock in the integration tests we need to
    append to the PYTHONPATH variable instead of overriding it. This way
    previously set paths will take precedence.
    GabrielNagy committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    f84a0fa View commit details
    Browse the repository at this point in the history
  2. Use shutil to remove non-empty directory

    Removing a directory with `os.removedirs` will fail if it's non-empty.
    We can circumvent this behavior by using `shutil.rmtree` instead.
    GabrielNagy committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    d10233b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6a2ae83 View commit details
    Browse the repository at this point in the history
  4. Integration tests for certificate policy manager

    Old data - policy configured & disabled
    Up to date - policy configured & enabled
    
    Some things to notice in the tests behavior:
    - no changes to user golden files with no initial state
    - purging machine policies removes the samba directory if it exists
    
    Fixes UDENG-1059
    GabrielNagy committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    b6275a7 View commit details
    Browse the repository at this point in the history
  5. Fix certificate test name

    Update the certificate test name to match the tested method name (and
    our convention).
    GabrielNagy committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    4de2c2a View commit details
    Browse the repository at this point in the history