def invoked(self): """Test remove of test-snapd-tools snap.""" print('Install {}...'.format(TEST_SNAP)) s = Snapd(SNAPD_TASK_TIMEOUT, SNAPD_POLL_INTERVAL) s.remove(TEST_SNAP) print('Check not in snap list') data = s.list() for snap in data: if snap['name'] == TEST_SNAP: print(' found in snap list') return 1 return 0
def invoked(self): """Test re-update of test-snapd-tools snap.""" s = Snapd(SNAPD_TASK_TIMEOUT, SNAPD_POLL_INTERVAL) print('Get edge channel revision from store...') r = s.info(TEST_SNAP) edge_rev = r['channels']['latest/edge']['revision'] print('Remove edge revision...') s.remove(TEST_SNAP, edge_rev) print('Refresh to edge channel...') s.refresh(TEST_SNAP, 'edge') print('Get new installed revision...') r = s.list(TEST_SNAP) rev = r['revision'] if rev != edge_rev: print("Not edge revision number") return 1