@@ -55,10 +55,7 @@ def testParsing1(self):
55
55
'OSG_SITE_NAME' : 'MY_SITE' ,
56
56
'OSG_SPONSOR' : 'osg:100' ,
57
57
'OSG_SITE_INFO' : 'http://example/com/policy.html' ,
58
- 'OSG_SITE_CITY' : 'Chicago' ,
59
- 'OSG_SITE_COUNTRY' : 'US' ,
60
- 'OSG_SITE_LONGITUDE' : '84.23' ,
61
- 'OSG_SITE_LATITUDE' : '23.32' }
58
+ }
62
59
for var in variables :
63
60
self .assertTrue (var in attributes ,
64
61
"Attribute %s missing" % var )
@@ -88,10 +85,7 @@ def testParsing2(self):
88
85
'OSG_SITE_NAME' : 'MY_SITE' ,
89
86
'OSG_SPONSOR' : 'osg:50 usatlas:50' ,
90
87
'OSG_SITE_INFO' : 'http://example/com/policy.html' ,
91
- 'OSG_SITE_CITY' : 'Chicago' ,
92
- 'OSG_SITE_COUNTRY' : 'US' ,
93
- 'OSG_SITE_LONGITUDE' : '-84.23' ,
94
- 'OSG_SITE_LATITUDE' : '-23.32' }
88
+ }
95
89
for var in variables :
96
90
self .assertTrue (var in attributes ,
97
91
"Attribute %s missing" % var )
@@ -121,10 +115,7 @@ def testParsing3(self):
121
115
'OSG_SITE_NAME' : 'MY_SITE' ,
122
116
'OSG_SPONSOR' : 'osg:50 usatlas:50' ,
123
117
'OSG_SITE_INFO' : 'http://example/com/policy.html' ,
124
- 'OSG_SITE_CITY' : 'Chicago' ,
125
- 'OSG_SITE_COUNTRY' : 'US' ,
126
- 'OSG_SITE_LONGITUDE' : '-84.23' ,
127
- 'OSG_SITE_LATITUDE' : '-23.32' }
118
+ }
128
119
for var in variables :
129
120
self .assertTrue (var in attributes ,
130
121
"Attribute %s missing" % var )
@@ -152,11 +143,7 @@ def testMissingAttribute(self):
152
143
153
144
mandatory_on_all = ['group' ]
154
145
# ^ TODO OSG 3.5: add "resource" to this list
155
- mandatory_on_ce = ['host_name' ,
156
- 'city' ,
157
- 'country' ,
158
- 'longitude' ,
159
- 'latitude' ]
146
+ mandatory_on_ce = ['host_name' ]
160
147
mandatory = list (mandatory_on_all )
161
148
if ce_installed ():
162
149
mandatory += mandatory_on_ce
@@ -171,74 +158,6 @@ def testMissingAttribute(self):
171
158
settings .parse_configuration ,
172
159
configuration )
173
160
174
- def testInvalidLatitude (self ):
175
- """
176
- Test the check_attributes with invalid latitude values
177
- """
178
-
179
- config_file = get_test_config ("siteattributes/" \
180
- "invalid_latitude1.ini" )
181
- configuration = configparser .SafeConfigParser ()
182
- configuration .read (config_file )
183
-
184
- settings = siteinformation .SiteInformation (logger = global_logger )
185
- try :
186
- settings .parse_configuration (configuration )
187
- except Exception as e :
188
- self .fail ("Received exception while parsing configuration: %s" % e )
189
-
190
- attributes = settings .get_attributes ()
191
- self .assertFalse (settings .check_attributes (attributes ),
192
- "Invalid latitude ignored" )
193
-
194
- config_file = get_test_config ("siteattributes/" \
195
- "invalid_latitude2.ini" )
196
- configuration = configparser .SafeConfigParser ()
197
- configuration .read (config_file )
198
- settings = siteinformation .SiteInformation (logger = global_logger )
199
- try :
200
- settings .parse_configuration (configuration )
201
- except Exception as e :
202
- self .fail ("Received exception while parsing configuration: %s" % e )
203
-
204
- attributes = settings .get_attributes ()
205
- self .assertFalse (settings .check_attributes (attributes ),
206
- "Invalid latitude ignored" )
207
-
208
- def testInvalidLongitude (self ):
209
- """
210
- Test the check_attributes with invalid longitude values
211
- """
212
-
213
- config_file = get_test_config ("siteattributes/" \
214
- "invalid_longitude1.ini" )
215
- configuration = configparser .SafeConfigParser ()
216
- configuration .read (config_file )
217
-
218
- settings = siteinformation .SiteInformation (logger = global_logger )
219
- try :
220
- settings .parse_configuration (configuration )
221
- except Exception as e :
222
- self .fail ("Received exception while parsing configuration: %s" % e )
223
-
224
- attributes = settings .get_attributes ()
225
- self .assertFalse (settings .check_attributes (attributes ),
226
- "Invalid latitude ignored" )
227
-
228
- config_file = get_test_config ("siteattributes/" \
229
- "invalid_longitude2.ini" )
230
- configuration = configparser .SafeConfigParser ()
231
- configuration .read (config_file )
232
- settings = siteinformation .SiteInformation (logger = global_logger )
233
- try :
234
- settings .parse_configuration (configuration )
235
- except Exception as e :
236
- self .fail ("Received exception while parsing configuration: %s" % e )
237
-
238
- attributes = settings .get_attributes ()
239
- self .assertFalse (settings .check_attributes (attributes ),
240
- "Invalid latitude ignored" )
241
-
242
161
def testInvalidHostname (self ):
243
162
"""
244
163
Test the check_attributes with invalid hostname
0 commit comments