Skip to content
  • Mike Latimer's avatar
    Prevent list_snapshots from causing test cleanup failure · d8afa058
    Mike Latimer authored and Daniel P. Berrangé's avatar Daniel P. Berrangé committed
    When TCK cleans up a test domain, existing snapshots are deleted. However,
    not all drivers (e.g. libxl) support snapshots. When such a driver is
    involved, the following error is reported and the testkit fails to cleanup
    the domain:
    
      libvirt error code: 3, message: this function is not supported by the
      connection driver: virDomainSnapshotNum
    
    Rather than erroring out, list_snapshots should be protected using eval. In
    the event the underlying driver does not support snapshots, an empty list is
    returned, and no snapshot deletion is attempted. (Note - It is the listing
    of snapshots that is causing the error, not the attempt to delete them.)
    d8afa058