remove out of date test code

Signed-off-by: jessicamack <jmack@redhat.com>
This commit is contained in:
jessicamack 2023-03-13 09:45:30 -04:00 committed by Hao Liu
parent cd3f7666be
commit 680e2bcc0a

View File

@ -279,7 +279,7 @@ def test_logging_aggregator_missing_settings(put, post, admin, key, value, error
],
)
@pytest.mark.django_db
def test_logging_aggregator_valid_settings(put, post, admin, type, host, port, username, password, mocker):
def test_logging_aggregator_valid_settings(put, post, admin, type, host, port, username, password):
_, mock_settings = _mock_logging_defaults()
# type = 'splunk'
# host = 'https://yoursplunk:8088/services/collector/event'
@ -292,8 +292,6 @@ def test_logging_aggregator_valid_settings(put, post, admin, type, host, port, u
mock_settings['LOG_AGGREGATOR_USERNAME'] = username
if password:
mock_settings['LOG_AGGREGATOR_PASSWORD'] = password
# mock testing pg_notify
mocker.patch("awx.conf.views.send_pg_notify", return_value=None)
url = reverse('api:setting_singleton_detail', kwargs={'category_slug': 'logging'})
response = put(url, data=mock_settings, user=admin, expect=200)
assert type in response.data.get('LOG_AGGREGATOR_TYPE')
@ -307,15 +305,13 @@ def test_logging_aggregator_valid_settings(put, post, admin, type, host, port, u
@pytest.mark.django_db
def test_logging_aggregator_connection_test_valid(put, post, admin, mocker):
def test_logging_aggregator_connection_test_valid(put, post, admin):
_, mock_settings = _mock_logging_defaults()
type = 'other'
host = 'https://localhost'
mock_settings['LOG_AGGREGATOR_ENABLED'] = True
mock_settings['LOG_AGGREGATOR_TYPE'] = type
mock_settings['LOG_AGGREGATOR_HOST'] = host
# mock testing pg_notify
mocker.patch("awx.conf.views.send_pg_notify", return_value=None)
# POST to save these mock settings
url = reverse('api:setting_singleton_detail', kwargs={'category_slug': 'logging'})
put(url, data=mock_settings, user=admin, expect=200)