source: TI12-security/trunk/python/ndg.security.test/ndg/security/test/configfileparsers/test.cfg @ 4319

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.test/ndg/security/test/configfileparsers/test.cfg@4447
Revision 4319, 1.5 KB checked in by pjkersha, 12 years ago (diff)

Major surgery on ConfigFileParsers? to enable support for nesting of component sections e.g.

[mySection]
sessionManager.credentialWallet.caCertFilePathList=ca/ndg-test-ca.crt

... yields a properties dictionary with:
mySection?sessionManager?credentialWallet?caCertFilePathList?='ca/ndg-test-ca.crt'

XML properties parsing is untested - will add warning for now but may deprecate.

Line 
1# Test Configuration file for ConfigFileParsers unit tests
2#
3# NERC Data Grid Project
4#
5# P J Kershaw 09/10/08
6#
7# Copyright (C) 2008 STFC & NERC
8#
9# This software may be distributed under the terms of the Q Public License,
10# version 1.0 or later.
11[DEFAULT]
12
13[test1CaseSensitiveConfigParser]
14# The CaseSensitiveConfigParser should read back two distinct options here.
15# Standard SafeConfigParser will retrieve one with option set to the last one
16# read i.e. = False
17CaseSensitiveOption=True
18casesensitiveoption=False
19
20[test2INIPropertyFile]
21# Test prefixing for a given application - an Attribute Authority in this case
22attributeAuthority.useSSL=False
23attributeAuthority.name: Site A
24attributeAuthority.attCertLifetime: 3600.0
25
26# This entry should log a warning because 'here' is not defined as an option
27# in this file
28location=%(here)s/somewhere
29
30# This should work OK - thisFile is set correctly because thisDir has been
31# defined
32thisDir=$NDGSEC_CONFIGFILEPARSERS_UNITTEST_DIR
33thisFile: %(thisDir)s/test.cfg
34
35[test3ReadAndValidateProperties]
36# Prefixing of options for the Session Manager application
37sessionManager.sslCertFile: sm.crt
38sessionManager.sslKeyFile: sm.key
39
40# Test a 3rd level of nesting - prefixed for the Session Manager but the
41# Session Manager itself has a Credential Wallet subcomponent
42sessionManager.credentialWallet.caCertFilePathList=ca/ndg-test-ca.crt
43
44# Test bool and int type conversions
45sessionManager.credentialWallet.mapFromTrustedHosts=True
46sessionManager.credentialWallet.attCertRefreshElapse=7200
Note: See TracBrowser for help on using the repository browser.