

def test_service_completed():
    package_install('cassandra', True, ['--package-version=0.2.0-1'])
    time.sleep(5)
    services = get_services(3)
    cassandra_id = None
    for service in services:
        if (service['name'] == 'cassandra.dcos'):
            cassandra_id = service['id']
            break
    assert (cassandra_id is not None)
    assert_command(['dcos', 'marathon', 'group', 'remove', '/cassandra'])
    service_shutdown(cassandra_id)
    delete_zk_node('cassandra-mesos')
    services = get_services(2)
    assert (not any(((service['id'] == cassandra_id) for service in services)))
    services = get_services(args=['--completed'])
    assert (len(services) >= 3)
    assert any(((service['id'] == services) for service in services))
    package_uninstall('cassandra')

dataset/ETHPy150Open dcos/dcos-cli/cli/tests/integrations/test_service.py test_service_completed/VarMisuse@161/235 `cassandra_id`->`services`