]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix error in unit test caused by timezone 31632/head
authorTiago Melo <tspmelo@gmail.com>
Thu, 14 Nov 2019 10:48:23 +0000 (09:48 -0100)
committerTiago Melo <tspmelo@gmail.com>
Thu, 14 Nov 2019 10:48:23 +0000 (09:48 -0100)
Unit test was only accepting positive timezones

Fixes: https://tracker.ceph.com/issues/42812
Signed-off-by: Tiago Melo <tmelo@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts

index c752873828ca12bd4bb60702f261bbaf3cbf460d..c996e4f24160ef378a70f1ce5e074fc7010d02d1 100644 (file)
@@ -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:]+$`)
       );
     });
   });