#3938 Use YAML configuration files for ipatests machine definition
Closed: Fixed None Opened 10 years ago by tbabej.

As we integrate more and more use cases into the integration tests, it's clear that the current way of handling the information to the test runner (via the environment variables) does not scale up well.

For complex tests that require manually pre-set machines with specific configuration (such as AD with or without POSIX support, legacy clients, etc.), we need to specify much more information than just the 'role' of the machine and it's IP address.

The current situation makes extending the framework a mess and absolutely will not be maintainable in the long run. Refactor the ipatests configuration to use configuration files instead of environment variables.


Doesn't using YAML add a new dependency to freeipa-tests package? Why not use JSON or something else that's in Python's standard library?

YAML is easy for humans to read/write, much more than JSON.

This is about adding an additional way to configure the tests; env vars will still be supported.
So it's not a hard dependency. We might want to leave it out of Requires if necessary.

Moving unfinished November tickets to January.

master:

  • 56f0430 test_integration.config: Fix crash in to_env when no replica is defined
  • 8e2bcef test_integration.config: Do not save the input environment
  • e1b73c1 test_integration.config: Use a more declarative approach to test-wide settings
  • 310d825 test_integration.config: Do not store the index in Domain and Host objects
  • ef0264f test_integration.config: Load/store from/to dicts
  • 2150481 test_integration.config: Add environment variables for JSON/YAML
  • 87a36db ipa-test-config: Add --json and --yaml output options
  • e6dbb2a test_integration.config: Convert some text values to str
  • 561e57d Add tests for integration test configuration

Leaving ticket open until I update the Wiki with new instructions.

ipa-3-3:

  • 450247e test_integration.config: Fix crash in to_env when no replica is defined
  • b8b5f76 test_integration.config: Do not save the input environment
  • 10cd1cd test_integration.config: Use a more declarative approach to test-wide settings
  • 048cdb2 test_integration.config: Do not store the index in Domain and Host objects
  • 5668a0d test_integration.config: Load/store from/to dicts
  • be57cbe test_integration.config: Add environment variables for JSON/YAML
  • 381379c ipa-test-config: Add --json and --yaml output options
  • 3e4b310 test_integration.config: Convert some text values to str
  • 23814f9 Add tests for integration test configuration

Metadata Update from @tbabej:
- Issue assigned to pviktori
- Issue set to the milestone: FreeIPA 4.0 Backlog

7 years ago

Login to comment on this ticket.

Metadata