- administrative user is ADMIN on the Oracle Cloud databases and SYSTEM on local databases (SYSDBA is not available on the Oracle Cloud database) - environment variables CX_ORACLE_TEST_SYSDBA_USER and CX_ORACLE_TEST_SYSDBA_PASSWORD are replaced with CX_ORACLE_TEST_ADMIN_USER and CX_ORACLE_TEST_ADMIN_PASSWORD - skip tests that change passwords as passwords on Oracle Cloud database are strictly controlled - skip tests that check subscriptions as these are not currently supported on Oracle Cloud database
34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
#------------------------------------------------------------------------------
|
|
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
|
#------------------------------------------------------------------------------
|
|
|
|
#------------------------------------------------------------------------------
|
|
# SetupTest.py
|
|
#
|
|
# Creates users and populates their schemas with the tables and packages
|
|
# necessary for the cx_Oracle test suite.
|
|
#------------------------------------------------------------------------------
|
|
|
|
from __future__ import print_function
|
|
|
|
import cx_Oracle
|
|
|
|
import TestEnv
|
|
import DropTest
|
|
|
|
# connect as administrative user (usually SYSTEM or ADMIN)
|
|
conn = cx_Oracle.connect(TestEnv.GetAdminConnectString())
|
|
|
|
# drop existing users and editions, if applicable
|
|
DropTest.DropTests(conn)
|
|
|
|
# create test schemas
|
|
print("Creating test schemas...")
|
|
TestEnv.RunSqlScript(conn, "SetupTest",
|
|
main_user = TestEnv.GetMainUser(),
|
|
main_password = TestEnv.GetMainPassword(),
|
|
proxy_user = TestEnv.GetProxyUser(),
|
|
proxy_password = TestEnv.GetProxyPassword())
|
|
print("Done.")
|
|
|