From: Tiago Melo Date: Thu, 14 Nov 2019 10:48:23 +0000 (-0100) Subject: mgr/dashboard: Fix error in unit test caused by timezone X-Git-Tag: v15.1.0~899^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f5e88e1d113d5fbeeac2e52a2b2f9b03ace174fa;p=ceph-ci.git mgr/dashboard: Fix error in unit test caused by timezone Unit test was only accepting positive timezones Fixes: https://tracker.ceph.com/issues/42812 Signed-off-by: Tiago Melo --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts index c752873828c..c996e4f2416 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts @@ -203,7 +203,7 @@ describe('RbdSnapshotListComponent', () => { it('should display suggested snapshot name', () => { component.openCreateSnapshotModal(); expect(component.modalRef.content.snapName).toMatch( - RegExp(`^${component.rbdName}_[\\d-]+T[\\d.:]+\\+[\\d:]+\$`) + RegExp(`^${component.rbdName}_[\\d-]+T[\\d.:]+[\\+-][\\d:]+$`) ); }); });