def test_set_forwarders(self, session_browser): """Test setting forwarders.""" functional.app_enable(session_browser, 'bind') functional.set_forwarders(session_browser, '1.1.1.1') functional.set_forwarders(session_browser, '1.1.1.1 1.0.0.1') assert functional.get_forwarders(session_browser) == '1.1.1.1 1.0.0.1'
def test_download_upload_restore(session_browser, downloaded_file_info): """Test download, upload, and restore a backup.""" functional.set_forwarders(session_browser, '1.1.1.1') functional.backup_create(session_browser, 'bind', 'test_backups') functional.set_forwarders(session_browser, '1.0.0.1') _backup_download(session_browser, downloaded_file_info, 'test_backups') _backup_restore_from_upload(session_browser, 'bind', downloaded_file_info) assert functional.get_forwarders(session_browser) == '1.1.1.1'
def test_backup_restore(self, session_browser): """Test backup and restore.""" functional.app_enable(session_browser, 'bind') functional.set_forwarders(session_browser, '1.1.1.1') _enable_dnssec(session_browser, False) functional.backup_create(session_browser, 'bind', 'test_bind') functional.set_forwarders(session_browser, '1.0.0.1') _enable_dnssec(session_browser, True) functional.backup_restore(session_browser, 'bind', 'test_bind') assert functional.get_forwarders(session_browser) == '1.1.1.1' assert not _get_dnssec(session_browser)
def bind_assert_forwarders(session_browser, forwarders): assert functional.get_forwarders(session_browser) == forwarders