# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. ## Test config file for database utilities import socorro.lib.ConfigurationManager as cm import datetime from socorro.unittest.config.commonconfig import databaseHost from socorro.unittest.config.commonconfig import databaseName from socorro.unittest.config.commonconfig import databaseUserName from socorro.unittest.config.commonconfig import databasePassword logFilePathname = cm.Option() logFilePathname.doc = 'full pathname for the log file' logFilePathname.default = '%(testDir)s/logs/db_test.log'
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Deliberately use base-class's Option class just to see if things break (they better not) import socorro.lib.ConfigurationManager as cm testOption0 = cm.Option() testOption0.doc = 'option 0' testOption0.default = 0 testOption1 = cm.Option() testOption1.doc = 'option one' testOption1.default = 'one' logFilePathname = cm.Option() logFilePathname.default = '/some/bogus/location'
from socorro.unittest.config.commonconfig \ import databaseHost as database_hostname try: from socorro.unittest.config.commonconfig \ import databasePort as database_port except: database_port = 5432 from socorro.unittest.config.commonconfig \ import oldDatabaseName as database_name from socorro.unittest.config.commonconfig \ import databaseUserName as database_username from socorro.unittest.config.commonconfig \ import databasePassword as database_password logFilePathname = cm.Option() logFilePathname.doc = 'full pathname for the log file' logFilePathname.default = '%(testDir)s/logs/lib_test.log' logFileMaximumSize = cm.Option() logFileMaximumSize.doc = 'maximum size in bytes of the log file' logFileMaximumSize.default = 1000000 logFileMaximumBackupHistory = cm.Option() logFileMaximumBackupHistory.doc = 'maximum number of log files to keep' logFileMaximumBackupHistory.default = 50 logFileLineFormatString = cm.Option() logFileLineFormatString.doc = 'python logging system format for log file entries' logFileLineFormatString.default = '%(asctime)s %(levelname)s - %(message)s'
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import socorro.lib.ConfigurationManager as cm testNil = cm.Option() testSingleCharacter = cm.Option() testSingleCharacter.singleCharacter = 'T' testDefault = cm.Option() testDefault.default = 'default' testDoc = cm.Option() testDoc.doc = 'test doc'
#bigStorageRoot.doc = 'the root of the file system where big test set is found' #bigStorageRoot.default = '%(testDir)s/testdata' #dumpDirPrefix = cm.Option() #dumpDirPrefix.doc = 'dump directory names begin with this prefix' #dumpDirPrefix.default = 'tst_' #jsonFileSuffix = cm.Option() #jsonFileSuffix.doc = 'the suffix used to identify a json file' #jsonFileSuffix.default = '.json' #dumpFileSuffix = cm.Option() #dumpFileSuffix.doc = 'the suffix used to identify a dump file' #dumpFileSuffix.default = '.dump' processorCheckInTime = cm.Option() processorCheckInTime.doc = 'the time after which a processor is considered dead (HH:MM:SS)' processorCheckInTime.default = "00:05:00" processorCheckInTime.fromStringConverter = lambda x: str( cm.timeDeltaConverter(x)) standardLoopDelay = cm.Option() standardLoopDelay.doc = 'the time between scans for jobs (HHH:MM:SS)' standardLoopDelay.default = '00:05:00' standardLoopDelay.fromStringConverter = cm.timeDeltaConverter cleanupJobsLoopDelay = cm.Option() cleanupJobsLoopDelay.doc = 'the time between runs of the job clean up routines (HHH:MM:SS)' cleanupJobsLoopDelay.default = '00:05:00' cleanupJobsLoopDelay.fromStringConverter = cm.timeDeltaConverter
#storageRoot.doc = 'the root of the file system where dumps are found' #storageRoot.default = '%(testDir)s/dumpTest/toBeProcessed/' #deferredStorageRoot = cm.Option() #deferredStorageRoot.doc = 'the root of the file system where dumps are found' #deferredStorageRoot.default = '%(testDir)s/dumpTest/toBeDeferred/' #processedDumpStoragePath = cm.Option() #processedDumpStoragePath.doc = 'the path of the file system where processed dumps are stored' #processedDumpStoragePath.default = '%(testDir)s/dumpTest/processedDumps' #dumpDirPrefix = cm.Option() #dumpDirPrefix.doc = 'dump directory names begin with this prefix' #dumpDirPrefix.default = 'tst_' elasticSearchOoidSubmissionUrl = cm.Option() elasticSearchOoidSubmissionUrl.doc = 'a url to submit ooids for Elastic Search (use %s in place of the ooid) (leave blank for no Elastic Search)' elasticSearchOoidSubmissionUrl.default = '%s' temporaryFileSystemStoragePath = cm.Option() temporaryFileSystemStoragePath.doc = 'a local filesystem path where processor can write dumps temporarily for processing' temporaryFileSystemStoragePath.default = './' jsonFileSuffix = cm.Option() jsonFileSuffix.doc = 'the suffix used to identify a json file' jsonFileSuffix.default = '.json' dumpFileSuffix = cm.Option() dumpFileSuffix.doc = 'the suffix used to identify a dump file' dumpFileSuffix.default = '.dump'