Closed oveits closed 8 years ago
Testing with following change:
expect{ @mychildobj = createObjDB(child(obj)) }.to change(Object.const_get(child(obj)), :count).by(1) unless child(obj).nil?
replaced by:
expect{ @mychildobj = createObjDB(child(obj), 0) }.to change(Object.const_get(child(obj)), :count).by(1) unless child(obj).nil? || defaultParams(child(obj), 0).nil?
#abort defaultParams(obj, 1).inspect
expect{ @mychildobj = createObjDB(child(obj), 1) }.to change(Object.const_get(child(obj)), :count).by(1) unless child(obj).nil? || defaultParams(child(obj), 1).nil? || child(obj) == "Site" # for sites, paramsSet 1 is a duplicate name to paramsSet2 for testing sync. Therefore, it will never be provisioned on the target
expect{ @mychildobj = createObjDB(child(obj), 2) }.to change(Object.const_get(child(obj)), :count).by(1) unless child(obj).nil? || defaultParams(child(obj), 2).nil?
expect{ @mychildobj = createObjDB(child(obj), 3) }.to change(Object.const_get(child(obj)), :count).by(1) unless child(obj).nil? || defaultParams(child(obj), 3).nil?
and commented out the abort in the function def defaultParams(obj, i = 0)
This seems to do the trick (full test suite in progress now)
Note that I had to exclude Site with paramsSet == 1, since this has the same Site name as paramsSet 0 and has a special purpose for synchronization testing. If createObjDB is applied for Sites with paramsSet == 1 is applied, the number of sites will not be increased because of the duplicate name.
Tested with OSV V7R1 (CSL8): ExampleCustomerV8 is configured with Site3. In this case, startTests stops with following error: