Raxol.Plugins.Testing.FrameworkHelpers (Raxol v2.9.2)

View Source

Test helper functions for common plugin testing scenarios. Note: This module provides additional helpers specific to the PluginTestFramework. For basic test helpers, see Raxol.Plugins.Testing.Helpers.

Summary

Functions

Creates a test config for git plugin testing with git-specific defaults. Returns as keyword list for compatibility with BaseManager.

Initializes a deterministic Git repository for plugin integration tests.

Functions

capture_plugin_logs(fun)

cleanup_temp_directory(temp_dir)

create_git_test_config(overrides \\ %{})

Creates a test config for git plugin testing with git-specific defaults. Returns as keyword list for compatibility with BaseManager.

create_temp_directory()

create_test_files(base_path, file_specs)

initialize_git_repository!(repo_path)

@spec initialize_git_repository!(Path.t()) :: :ok

Initializes a deterministic Git repository for plugin integration tests.

The repository has a main branch, local test identity, commit signing disabled, and one committed README.md.

simulate_file_change(plugin_pid, path, events \\ [:modified])

simulate_timer_tick(plugin_pid)

with_temp_directory(fun)