mirror of
https://github.com/ansible/awx.git
synced 2026-04-12 05:29:24 -02:30
* Add dispatcherctl command * Add tests for dispatcherctl command * Exit early if sqlite3 * Switch to dispatcherd mgmt cmd * Move unwanted command options to run_dispatcher * Add test for new stuff * Update the SOS report status command * make docs always reference new command * Consistently error if given config file
18 lines
585 B
Python
18 lines
585 B
Python
import pytest
|
|
|
|
from awx.main.dispatch.config import get_dispatcherd_config
|
|
from awx.main.management.commands.dispatcherd import _hash_config
|
|
|
|
|
|
@pytest.mark.django_db
|
|
def test_dispatcherd_config_hash_is_stable(settings, monkeypatch):
|
|
monkeypatch.setenv('AWX_COMPONENT', 'dispatcher')
|
|
settings.CLUSTER_HOST_ID = 'test-node'
|
|
settings.JOB_EVENT_WORKERS = 1
|
|
settings.DISPATCHER_SCHEDULE = {}
|
|
|
|
config_one = get_dispatcherd_config(for_service=True)
|
|
config_two = get_dispatcherd_config(for_service=True)
|
|
|
|
assert _hash_config(config_one) == _hash_config(config_two)
|