diff --git a/src/metabase/sync/interface.clj b/src/metabase/sync/interface.clj index 6ade4fcfada4c0bb29fbaca71ee9f8a0dd5fe1f1..2a3246b3fbb984eb4920f239d98eddd3a960aaf7 100644 --- a/src/metabase/sync/interface.clj +++ b/src/metabase/sync/interface.clj @@ -97,7 +97,7 @@ [[1 \"Rasta Toucan\"] [2 \"Lucky Pigeon\"] - [3 \"Kanye Nest\"]]" + [3 \"Parroty\"]]" [[s/Any]]) diff --git a/test/metabase/api/database_test.clj b/test/metabase/api/database_test.clj index e087630f5978a96f940f4174359eeac2be329eb9..67c79f11909f2464e3a1b4ce7d325aca087c68de 100644 --- a/test/metabase/api/database_test.clj +++ b/test/metabase/api/database_test.clj @@ -410,9 +410,9 @@ (deftest card-autocomplete-suggestions-test (testing "GET /api/database/:id/card_autocomplete_suggestions" - (mt/with-temp* [Collection [collection {:name "Kanye West Analytics"}] - Card [card-1 (card-with-native-query "Kanye West Quote Views Per Month")] - Card [card-2 (card-with-native-query "Kanye West Quote Views Per Day" :collection_id (:id collection))]] + (mt/with-temp* [Collection [collection {:name "Maz Analytics"}] + Card [card-1 (card-with-native-query "Maz Quote Views Per Month")] + Card [card-2 (card-with-native-query "Maz Quote Views Per Day" :collection_id (:id collection))]] (let [card->result {card-1 (assoc (select-keys card-1 [:id :name :dataset]) :collection_name nil) card-2 (assoc (select-keys card-2 [:id :name :dataset]) :collection_name (:name collection))}] (testing "exclude cards without perms" @@ -420,25 +420,25 @@ (is (= [(card->result card-2)] (mt/user-http-request :rasta :get 200 (format "database/%d/card_autocomplete_suggestions" (mt/id)) - :query "kanye")))) + :query "maz")))) (testing "cards should match the query" - (doseq [[query expected-cards] {"QUOTE-views" [card-2 card-1] - "per-day" [card-2] - (str (:id card-1)) [card-1] - (str (:id card-2) "-kanye") [card-2] - (str (:id card-2) "-west") []}] + (doseq [[query expected-cards] {"QUOTE-views" [card-2 card-1] + "per-day" [card-2] + (str (:id card-1)) [card-1] + (str (:id card-2) "-maz") [card-2] + (str (:id card-2) "-kyle") []}] (is (= (map card->result expected-cards) (mt/user-http-request :rasta :get 200 (format "database/%d/card_autocomplete_suggestions" (mt/id)) :query query))))))) (testing "should reject requests for databases for which the user has no perms" (mt/with-temp* [Database [{database-id :id}] - Card [_ (card-with-native-query "Kanye West Quote Views Per Month" :database_id database-id)]] + Card [_ (card-with-native-query "Maz Quote Views Per Month" :database_id database-id)]] (perms/revoke-data-perms! (perms-group/all-users) database-id) (is (= "You don't have permissions to do that." (mt/user-http-request :rasta :get 403 (format "database/%d/card_autocomplete_suggestions" database-id) - :query "kanye")))))))) + :query "maz")))))))) (driver/register! ::no-nested-query-support :parent :sql-jdbc @@ -541,7 +541,7 @@ (:data (mt/user-http-request :crowberto :get 200 (str "database" params)))))] (testing "Check that we get back 'virtual' tables for Saved Questions" (testing "The saved questions virtual DB should be the last DB in the list" - (mt/with-temp Card [card (card-with-native-query "Kanye West Quote Views Per Month")] + (mt/with-temp Card [card (card-with-native-query "Maz Quote Views Per Month")] ;; run the Card which will populate its result_metadata column (mt/user-http-request :crowberto :post 202 (format "card/%d/query" (u/the-id card))) ;; Now fetch the database list. The 'Saved Questions' DB should be last on the list @@ -551,7 +551,7 @@ (check-tables-included response (virtual-table-for-card card))))) (testing "Make sure saved questions are NOT included if the setting is disabled" - (mt/with-temp Card [card (card-with-native-query "Kanye West Quote Views Per Month")] + (mt/with-temp Card [card (card-with-native-query "Maz Quote Views Per Month")] (mt/with-temporary-setting-values [enable-nested-queries false] ;; run the Card which will populate its result_metadata column (mt/user-http-request :crowberto :post 202 (format "card/%d/query" (u/the-id card))) diff --git a/test/metabase/driver/postgres_test.clj b/test/metabase/driver/postgres_test.clj index 7a9b0474ed15fc56674aa3779aa39317b8ac0655..4a87b3de6b35c6cf4a7b8bd148f5b3fd87fad7c4 100644 --- a/test/metabase/driver/postgres_test.clj +++ b/test/metabase/driver/postgres_test.clj @@ -225,7 +225,7 @@ (let [sync! #(sync/sync-database! database)] ;; populate the DB and create a view (exec! spec ["CREATE table birds (name VARCHAR UNIQUE NOT NULL);" - "INSERT INTO birds (name) VALUES ('Rasta'), ('Lucky'), ('Kanye Nest');" + "INSERT INTO birds (name) VALUES ('Rasta'), ('Lucky'), ('Parroty');" "CREATE VIEW angry_birds AS SELECT upper(name) AS name FROM birds;" "GRANT ALL ON angry_birds to PUBLIC;"]) ;; now sync the DB diff --git a/test/metabase/models/permissions_test.clj b/test/metabase/models/permissions_test.clj index b6bb84a7bf96f01f9741ebe4160340586767820c..b7b6ebcb2e117cebbaa1c180d7ffb0b38861bd15 100644 --- a/test/metabase/models/permissions_test.clj +++ b/test/metabase/models/permissions_test.clj @@ -420,7 +420,7 @@ #{"/db/1/" "//"} #{"/db/1/" "/db/1/table/2/"} #{"/db/1/native/schema/"} - #{"/db/1/schema/public/" "/kanye/"} + #{"/db/1/schema/public/" "/parroty/"} #{"/db/1/schema/public/table/1/" "/ocean/"}]}] (testing group (doseq [perms-set sets]