def test_success_message_for_id(self, factory, is_root, capsys): cli_zap = zap.Zap([]) args = factory(devices=[], osd_id='1', osd_fsid=None) cli_zap.args = args cli_zap.zap() out, err = capsys.readouterr() assert "Zapping successful for OSD: 1" in err
def test_invalid_osd_id_passed(self): with pytest.raises(SystemExit): zap.Zap(argv=['--osd-id', 'foo']).main()