Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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)
Ejemplo n.º 4
0
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)
Ejemplo n.º 5
0
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)