Package com.snowflake.connectors.common
Class SharedObjects
- java.lang.Object
-
- com.snowflake.connectors.common.SharedObjects
-
public final class SharedObjects extends Object
Shared objects for use in integration and app tests.
-
-
Field Summary
Fields Modifier and Type Field Description static com.snowflake.connectors.common.object.Identifier
SHARED_TEST_DB
Name of the database used for storing shared objects.static com.snowflake.connectors.common.object.SchemaName
SHARED_TEST_DB_PUBLIC_SCHEMA
Name of the database schema used for storing shared objects.static com.snowflake.connectors.common.object.Identifier
TEST_GH_EAI
Name of the shared external access integration, configured withTEST_GH_NETWORK_RULE
andTEST_SECRET
.static com.snowflake.connectors.common.object.ObjectName
TEST_GH_NETWORK_RULE
Name of the shared network rule, configured forapi.github.com:443
.static com.snowflake.connectors.common.object.ObjectName
TEST_SECRET
Name of the shared generic string secret, with the value ofTEST
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addGrantsOnSharedObjectsToApplication(Session session, String appName)
Adds usage grants to the specified application for all the shared objects specified above.static void
createSharedObjects(Session session)
Creates all the shared objects specified above.
-
-
-
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 ofTEST
.
-
TEST_GH_NETWORK_RULE
public static final com.snowflake.connectors.common.object.ObjectName TEST_GH_NETWORK_RULE
Name of the shared network rule, configured forapi.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 withTEST_GH_NETWORK_RULE
andTEST_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 objectappName
- application instance name
-
-