]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix error in unit test caused by timezone 34473/head
authorTiago Melo <tspmelo@gmail.com>
Thu, 14 Nov 2019 10:48:23 +0000 (09:48 -0100)
committerVicente Cheng <freeze.bilsted@gmail.com>
Wed, 8 Apr 2020 13:44:07 +0000 (13:44 +0000)
Unit test was only accepting positive timezones

Fixes: https://tracker.ceph.com/issues/42812
Signed-off-by: Tiago Melo <tmelo@suse.com>
(cherry picked from commit f5e88e1d113d5fbeeac2e52a2b2f9b03ace174fa)

src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts

index 81c1c0e2875aa2f96d22205c22576eadda3b5a27..5eaed1c1ef64c813a4161f2b98a766baa118c180 100644 (file)
@@ -212,7 +212,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:]+$`)
       );
     });
   });