def test_should_revise_readahead_when_config_not_present(mocker, capsys): mock_config = _get_new_mock_config( True, has_readahead_optimization_item_in_config=False) _mock_conditions(mocker) assert False == mount_efs.should_revise_readahead(mock_config) out, err = capsys.readouterr() assert 'config file does not have' in out
def test_should_revise_readahead_on_linux_gt_min_version(mocker): mock_config = _get_new_mock_config(True) _mock_conditions(mocker, kernel_version=[6, 5]) assert True == mount_efs.should_revise_readahead(mock_config)
def test_should_revise_readahead_on_linux_lower_54(mocker): mock_config = _get_new_mock_config(True) _mock_conditions(mocker, kernel_version=[5, 3]) assert False == mount_efs.should_revise_readahead(mock_config)
def test_should_revise_readahead_on_none_linux(mocker): mock_config = _get_new_mock_config(True) _mock_conditions(mocker, system='Unknown') assert False == mount_efs.should_revise_readahead(mock_config)
def test_should_revise_readahead_disable_in_config(mocker): mock_config = _get_new_mock_config(False) assert False == mount_efs.should_revise_readahead(mock_config)