From 3baf961bf84d7a67c838d6bc09cc5f0fe90a35b4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 30 Sep 2024 06:54:49 +0200 Subject: Merging upstream version 25.24.0. Signed-off-by: Daniel Baumann --- tests/dialects/test_oracle.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests/dialects/test_oracle.py') diff --git a/tests/dialects/test_oracle.py b/tests/dialects/test_oracle.py index 28a8da9..8675086 100644 --- a/tests/dialects/test_oracle.py +++ b/tests/dialects/test_oracle.py @@ -546,3 +546,21 @@ WHERE self.validate_identity( f"SELECT * FROM t WHERE JSON_EXISTS(name{format_json}, '$[1].middle'{passing}{on_cond})" ) + + def test_grant(self): + grant_cmds = [ + "GRANT purchases_reader_role TO george, maria", + "GRANT USAGE ON TYPE price TO finance_role", + "GRANT USAGE ON DERBY AGGREGATE types.maxPrice TO sales_role", + ] + + for sql in grant_cmds: + with self.subTest(f"Testing Oracles's GRANT command statement: {sql}"): + self.validate_identity(sql, check_command_warning=True) + + self.validate_identity("GRANT SELECT ON TABLE t TO maria, harry") + self.validate_identity("GRANT SELECT ON TABLE s.v TO PUBLIC") + self.validate_identity("GRANT SELECT ON TABLE t TO purchases_reader_role") + self.validate_identity("GRANT UPDATE, TRIGGER ON TABLE t TO anita, zhi") + self.validate_identity("GRANT EXECUTE ON PROCEDURE p TO george") + self.validate_identity("GRANT USAGE ON SEQUENCE order_id TO sales_role") -- cgit v1.2.3