From dae3cad26a446e00a6e945556bd187cd9409a040 Mon Sep 17 00:00:00 2001 From: Yang Chiu Date: Mon, 16 Dec 2024 10:12:35 +0800 Subject: [PATCH] test(robot): fix recurring job test cases for v2 volumes Signed-off-by: Yang Chiu --- e2e/libs/recurringjob/rest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/libs/recurringjob/rest.py b/e2e/libs/recurringjob/rest.py index 334fdbafeb..4e6b9207a8 100644 --- a/e2e/libs/recurringjob/rest.py +++ b/e2e/libs/recurringjob/rest.py @@ -130,8 +130,8 @@ def _check_snapshot_created(self, volume_name, job_name): # but job_name is in spec.labels.RecurringJob # and crd doesn't support field selector # so need to filter by ourselves - if 'RecurringJob' in item['status']['labels'] and \ - item['status']['labels']['RecurringJob'] == job_name and \ + if 'RecurringJob' in item['spec']['labels'] and \ + item['spec']['labels']['RecurringJob'] == job_name and \ item['status']['readyToUse'] == True: snapshot_time = item['metadata']['creationTimestamp'] snapshot_time = datetime.strptime(snapshot_time, '%Y-%m-%dT%H:%M:%SZ')