]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-bucket.service.spec.ts
import 15.2.0 Octopus source
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / rgw-bucket.service.spec.ts
index 0aed3268137cd9e5458183e7225f906fb380958d..0d342c48d1cd4f547647b00811158fd73fca3392 100644 (file)
@@ -62,14 +62,22 @@ describe('RgwBucketService', () => {
   });
 
   it('should call create', () => {
-    service.create('foo', 'bar').subscribe();
-    const req = httpTesting.expectOne('api/rgw/bucket?bucket=foo&uid=bar');
+    service
+      .create('foo', 'bar', 'default', 'default-placement', false, 'COMPLIANCE', '10', '0')
+      .subscribe();
+    const req = httpTesting.expectOne(
+      'api/rgw/bucket?bucket=foo&uid=bar&zonegroup=default&placement_target=default-placement&lock_enabled=false&lock_mode=COMPLIANCE&lock_retention_period_days=10&lock_retention_period_years=0'
+    );
     expect(req.request.method).toBe('POST');
   });
 
   it('should call update', () => {
-    service.update('foo', 'bar', 'baz').subscribe();
-    const req = httpTesting.expectOne('api/rgw/bucket/foo?bucket_id=bar&uid=baz');
+    service
+      .update('foo', 'bar', 'baz', 'Enabled', 'Enabled', '1', '223344', 'GOVERNANCE', '0', '1')
+      .subscribe();
+    const req = httpTesting.expectOne(
+      'api/rgw/bucket/foo?bucket_id=bar&uid=baz&versioning_state=Enabled&mfa_delete=Enabled&mfa_token_serial=1&mfa_token_pin=223344&lock_mode=GOVERNANCE&lock_retention_period_days=0&lock_retention_period_years=1'
+    );
     expect(req.request.method).toBe('PUT');
   });