|
20 | 20 | (fixtures/grant-all-acl-fixture)) |
21 | 21 | (use-fixtures :once (fixtures/int-test-fixtures)) |
22 | 22 |
|
23 | | -(deftest invalid-search-test |
| 23 | +(deftest ^:serial invalid-search-test |
24 | 24 | (testing "Accept header" |
25 | 25 | (testing "Other than JSON is rejected" |
26 | 26 | (is (= {:status 400 |
|
59 | 59 | [{} 0] |
60 | 60 | (partition 2 group-permissions)))) |
61 | 61 |
|
62 | | -(deftest acl-search-order-test |
| 62 | +(deftest ^:serial acl-search-order-test |
63 | 63 | ;; Conforms to requirements set out in CMR-3590, alphabetical order regardless of case |
64 | 64 | (let [token (e/login (u/conn-context) "user1") |
65 | 65 | acl1 (u/ingest-acl token {:group_permissions [{:user_type "registered" :permissions ["read"]}] |
|
85 | 85 | "System - GROUP"] |
86 | 86 | (map :name (:items (ac/search-for-acls (merge {:token token} (u/conn-context)) {}))))))) |
87 | 87 |
|
88 | | -(deftest acl-search-permission-test |
| 88 | +(deftest ^:serial acl-search-permission-test |
89 | 89 | (let [_token (e/login (u/conn-context) "user1") |
90 | 90 | admin-token (e/login (u/conn-context) "admin" ["AG1200000000-CMR"]) |
91 | 91 | group1 (u/ingest-group admin-token |
|
164 | 164 | (is (= (u/acls->search-response 1 [acl7]) |
165 | 165 | (dissoc response :took))))))) |
166 | 166 |
|
167 | | -(deftest acl-search-test |
| 167 | +(deftest ^:serial acl-search-test |
168 | 168 | (let [admin-token (e/login (u/conn-context) "admin" ["AG1200000000-CMR"]) |
169 | 169 | group1 (u/ingest-group admin-token |
170 | 170 | {:name "group1"} |
|
271 | 271 | {:page_size 3 :page_num 2} |
272 | 272 | {:token admin-token}) :took)))))) |
273 | 273 |
|
274 | | -(deftest acl-search-by-any-id-test |
| 274 | +(deftest ^:serial acl-search-by-any-id-test |
275 | 275 | (let [token (e/login (u/conn-context) "user1") |
276 | 276 | acl1 (u/ingest-acl token (u/catalog-item-acl "All Collections")) |
277 | 277 | acl2 (u/ingest-acl token (u/catalog-item-acl "All Granules")) |
|
297 | 297 | (:concept-id acl2) |
298 | 298 | "acl3-legacy-guid"]}))) |
299 | 299 |
|
300 | | -(deftest acl-search-permitted-group-test |
| 300 | +(deftest ^:serial acl-search-permitted-group-test |
301 | 301 | (declare group-permissions acls query-map) |
302 | 302 | (u/without-publishing-messages |
303 | 303 | (let [token (e/login (u/conn-context) "user1") |
|
456 | 456 | :content-type :json} |
457 | 457 | (ac/search-for-acls (u/conn-context) query {:token token :raw? true})))))))) |
458 | 458 |
|
459 | | -(deftest acl-search-by-identity-type-test |
| 459 | +(deftest ^:serial acl-search-by-identity-type-test |
460 | 460 | (declare identity-types expected-acls) |
461 | 461 | (let [admin-token (e/login (u/conn-context) "admin" ["AG1200000000-CMR"]) |
462 | 462 | group1 (u/ingest-group admin-token |
|
505 | 505 | "Identity type searches are always case-insensitive" |
506 | 506 | ["PrOvIdEr"] (concat [fixtures/*fixture-provider-acl*] provider-group-acls))))) |
507 | 507 |
|
508 | | -(deftest acl-search-by-target-test |
| 508 | +(deftest ^:serial acl-search-by-target-test |
509 | 509 | (declare target) |
510 | 510 | (let [token (e/login (u/conn-context) "user1") |
511 | 511 | single-instance-acl (u/ingest-acl token |
|
529 | 529 | "Provider target, case insensitive" |
530 | 530 | ["catalog_item_acl"] [fixtures/*fixture-provider-acl*]))) |
531 | 531 |
|
532 | | -(deftest acl-search-by-permitted-user-test |
| 532 | +(deftest ^:serial acl-search-by-permitted-user-test |
533 | 533 | (declare user users) |
534 | 534 | (let [admin-token (e/login (u/conn-context) "admin" ["AG1200000000-CMR"]) |
535 | 535 | group1 (u/ingest-group admin-token {:name "group1"} ["user1"]) |
|
593 | 593 | "User names are case-insensitive" |
594 | 594 | ["USER1"] [fixtures/*fixture-system-acl* fixtures/*fixture-provider-acl* acl-registered-1 acl-registered-2 acl-group1 acl-group2])))) |
595 | 595 |
|
596 | | -(deftest acl-search-provider-test |
| 596 | +(deftest ^:serial acl-search-provider-test |
597 | 597 | (declare options provider-ids) |
598 | 598 | (let [admin-token (e/login (u/conn-context) "admin" ["AG1200000000-CMR"]) |
599 | 599 | group1 (u/ingest-group admin-token {:name "group1"} ["user1"]) |
|
675 | 675 | "Multiple providers with empty results using ignore_case=false option" |
676 | 676 | ["prov1"] {"options[provider][ignore_case]" false} [])))) |
677 | 677 |
|
678 | | -(deftest acl-search-multiple-criteria |
| 678 | +(deftest ^:serial acl-search-multiple-criteria |
679 | 679 | (let [admin-token (e/login (u/conn-context) "admin" ["AG1200000000-CMR"]) |
680 | 680 | group1 (u/ingest-group admin-token {:name "group1"} ["user1"]) |
681 | 681 | group2 (u/ingest-group admin-token {:name "group2"} ["user2"]) |
|
743 | 743 | :permitted-user "user2"} |
744 | 744 | [acl3 fixtures/*fixture-provider-acl* acl5 acl7])))) |
745 | 745 |
|
746 | | -(deftest acl-search-with-legacy-group-guid-test |
| 746 | +(deftest ^:serial acl-search-with-legacy-group-guid-test |
747 | 747 | (let [admin-token (e/login (u/conn-context) "admin" ["AG1200000000-CMR"]) |
748 | 748 | group1-legacy-guid "group1-legacy-guid" |
749 | 749 | group1 (u/ingest-group admin-token |
|
804 | 804 | (is (= (u/acls->search-response (count expected-acls) expected-acls {:include-full-acl true}) |
805 | 805 | (dissoc response :took))))))) |
806 | 806 |
|
807 | | -(deftest acl-reindexing-test |
| 807 | +(deftest ^:serial acl-reindexing-test |
808 | 808 | (u/without-publishing-messages |
809 | 809 | (let [token (e/login (u/conn-context) "user1") |
810 | 810 | acl1 (u/ingest-acl token (assoc (u/system-acl "METRIC_DATA_POINT_SAMPLE") |
|
850 | 850 | (count expected-acls-after-reindexing) expected-acls-after-reindexing))) |
851 | 851 | (set (:items actual-response)))))))) |
852 | 852 |
|
853 | | -(deftest acl-search-by-target-group-id-test |
| 853 | +(deftest ^:serial acl-search-by-target-group-id-test |
854 | 854 | (let [admin-token (e/login (u/conn-context) "admin" ["AG1200000000-CMR"]) |
855 | 855 | group1 (u/ingest-group admin-token |
856 | 856 | {:name "group1"} |
|
0 commit comments