oops
[tests.git] / system / config_default.py
index 00ababf..103fcc7 100644 (file)
@@ -461,7 +461,7 @@ def tcp_specs (options,index):
     specs += [ same_node_same_slice ]
 # worth another try
     specs += [ same_node_2_slices ]
-    if options.size >:
+    if options.size > 1:
         specs += [ two_nodes_same_slice, two_nodes_2_slices ]
     return specs
 
@@ -518,7 +518,7 @@ def plc (options,index) :
         'initscripts': initscripts(options,index),
         'slices' : slices(options,index),
         'tcp_specs' : tcp_specs(options,index),
-       'sfa' : sfa(options,index),
+        'sfa' : sfa(options,index),
         'leases' : leases (options, index),
         # big distros need more time to install nodes
         'ssh_node_boot_timers': (40,38),
@@ -611,9 +611,26 @@ def test_auth_sfa_spec (options,index,rspec_style):
              } 
 
 
-def config (plc_specs,options):
-    result=plc_specs
+def config (plc_specs, options):
+    result = plc_specs
     # plc 'index' starts with 1 
-    for i in range (options.size):
-        result.append(plc(options,i+1))
+    for i in range(options.size):
+        result.append(plc(options, i+1))
     return result
+
+### for creating a sample config interactively
+def sample_test_plc_spec ():
+    class Void: pass
+
+    options = Void()
+    options.size = 1
+    options.rspec_styles = ['pg']
+
+    return config([], options)[0]
+
+if __name__ == '__main__':
+    s = sample_test_plc_spec()
+    print('Sample plc_spec has the following keys')
+    for k in sorted(s.keys()):
+        print(k)    
+