Class SharedObjects


  • public final class SharedObjects
    extends Object
    Shared objects for use in integration and app tests.
    • Field Detail

      • SHARED_TEST_DB

        public static final com.snowflake.connectors.common.object.Identifier SHARED_TEST_DB
        Name of the database used for storing shared objects.
      • SHARED_TEST_DB_PUBLIC_SCHEMA

        public static final com.snowflake.connectors.common.object.SchemaName SHARED_TEST_DB_PUBLIC_SCHEMA
        Name of the database schema used for storing shared objects.
      • TEST_SECRET

        public static final com.snowflake.connectors.common.object.ObjectName TEST_SECRET
        Name of the shared generic string secret, with the value of TEST.
      • TEST_GH_NETWORK_RULE

        public static final com.snowflake.connectors.common.object.ObjectName TEST_GH_NETWORK_RULE
        Name of the shared network rule, configured for api.github.com:443.
      • TEST_GH_EAI

        public static final com.snowflake.connectors.common.object.Identifier TEST_GH_EAI
        Name of the shared external access integration, configured with TEST_GH_NETWORK_RULE and TEST_SECRET.
    • Method Detail

      • createSharedObjects

        public static void createSharedObjects​(Session session)
        Creates all the shared objects specified above.
        Parameters:
        session - Snowpark session object
      • addGrantsOnSharedObjectsToApplication

        public static void addGrantsOnSharedObjectsToApplication​(Session session,
                                                                 String appName)
        Adds usage grants to the specified application for all the shared objects specified above.
        Parameters:
        session - Snowpark session object
        appName - application instance name