Skip to content

Consider auto-generating default tests for plugin types #58

@ogajduse

Description

@ogajduse

Summary

PR #57 introduces auto-generation of default tests for PulpPlugin:

# All Pulp plugins use ci.yml from plugin_template
if not self.tests:
    self.tests = {'github': {'Python': 'ci.yml'}}

This allows config.yaml to omit the tests field, reducing repetition and maintenance burden.

Proposal

Apply similar auto-generation to other plugin types where tests follow predictable patterns:

ForemanPlugin

  • 38 of 47 plugins define tests in config.yaml
  • Many follow patterns like {Ruby: ruby_tests.yml, JavaScript: js_tests.yml}
  • Could auto-generate common patterns when not explicitly defined

Potential Benefits

  • DRY principle: Reduces repetitive configuration
  • Maintainability: Fewer lines to update when patterns change
  • Consistency: Ensures new plugins get sensible defaults
  • Opt-out friendly: Explicit tests: {} can override defaults

Considerations

  • Need to identify stable test patterns for each type
  • Must preserve ability to explicitly define no tests
  • Could start conservatively (one type at a time)

Questions

  1. Are there stable test patterns for ForemanPlugin worth encoding?
  2. Should SmartProxyPlugin/HammerPlugin adopt tests.github defaults alongside puppet_acceptance_tests?
  3. Would this change align with project maintainers' philosophy?

Related to PR #57 discussion: #57 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions