Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit 1ddf91c

Browse files
committed
Fix ResourceTest_DataElement
1 parent 799d6e4 commit 1ddf91c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/tests/suites/resource_test.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def teardown
9292
}
9393

9494
result = TestResult.new('X010',"Create new #{resource_class.name.demodulize}", nil, nil, nil)
95-
ignore_client_exception { @temp_resource = ResourceGenerator.generate(@resource_class,3).create }
95+
ignore_client_exception { @temp_resource = ResourceGenerator.generate(@resource_class,4).create }
9696
@temp_version = @client.reply.version
9797

9898
if @client.reply.code==201
@@ -118,7 +118,7 @@ def teardown
118118
result = TestResult.new('X012',"Conditional Create #{resource_class.name.demodulize} (No Matches)", nil, nil, nil)
119119
# chances are good that no resource has this ID
120120
ifNoneExist = { '_id' => "#{(SecureRandom.uuid * 2)[0..63]}" }
121-
ignore_client_exception { @conditional_create_resource_a = ResourceGenerator.generate(@resource_class,3).conditional_create(ifNoneExist) }
121+
ignore_client_exception { @conditional_create_resource_a = ResourceGenerator.generate(@resource_class,4).conditional_create(ifNoneExist) }
122122

123123
if @client.reply.code==201
124124
result.update(STATUS[:pass], "New #{resource_class.name.demodulize} was created.", @client.reply.body)
@@ -151,7 +151,7 @@ def teardown
151151
raise AssertionException.new("Preexisting #{resource_class.name.demodulize} unknown.", nil)
152152
end
153153
ifNoneExist = { '_id' => @preexisting_id }
154-
ignore_client_exception { @conditional_create_resource_b = ResourceGenerator.generate(@resource_class,3).conditional_create(ifNoneExist) }
154+
ignore_client_exception { @conditional_create_resource_b = ResourceGenerator.generate(@resource_class,4).conditional_create(ifNoneExist) }
155155

156156
if @client.reply.code==200
157157
result.update(STATUS[:pass], "Request was correctly ignored.", @client.reply.body)
@@ -172,7 +172,7 @@ def teardown
172172
result = TestResult.new('X014',"Conditional Create #{resource_class.name.demodulize}", nil, nil, nil)
173173
# this should match all resources
174174
ifNoneExist = { '_lastUpdated' => 'gt1900-01-01' }
175-
ignore_client_exception { @conditional_create_resource_c = ResourceGenerator.generate(@resource_class,3).conditional_create(ifNoneExist) }
175+
ignore_client_exception { @conditional_create_resource_c = ResourceGenerator.generate(@resource_class,4).conditional_create(ifNoneExist) }
176176

177177
if @client.reply.code==412
178178
result.update(STATUS[:pass], "Request correctly failed.", @client.reply.body)
@@ -248,7 +248,7 @@ def teardown
248248
if @preexisting.nil?
249249
result.update(STATUS[:skip], "Unable to update -- existing #{resource_class.name.demodulize} is not available or was not valid.", nil)
250250
else
251-
ResourceGenerator.set_fields!(@preexisting, version_namespace.to_s, 3)
251+
ResourceGenerator.set_fields!(@preexisting, version_namespace.to_s, 4)
252252
ResourceGenerator.apply_invariants!(@preexisting)
253253

254254
ignore_client_exception { @preexisting.update }
@@ -291,7 +291,7 @@ def teardown
291291
result = TestResult.new('X032',"Conditional Update #{resource_class.name.demodulize} (No Matches)", nil, nil, nil)
292292

293293
searchParams = { '_id' => "#{(SecureRandom.uuid * 2)[0..63]}" }
294-
ignore_client_exception { @conditional_update_resource_a = ResourceGenerator.generate(@resource_class,3).conditional_update(searchParams) }
294+
ignore_client_exception { @conditional_update_resource_a = ResourceGenerator.generate(@resource_class,4).conditional_update(searchParams) }
295295
# chances are good that no resource has this ID
296296

297297
if @client.reply.code==201
@@ -335,7 +335,7 @@ def teardown
335335
if @preexisting.nil?
336336
result.update(STATUS[:skip], "Unable to update -- existing #{resource_class.name.demodulize} is not available or was not valid.", nil)
337337
else
338-
ResourceGenerator.set_fields!(@preexisting, version_namespace.to_s, 3)
338+
ResourceGenerator.set_fields!(@preexisting, version_namespace.to_s, 4)
339339
ResourceGenerator.apply_invariants!(@preexisting)
340340

341341
searchParams = { '_id' => @preexisting_id }
@@ -379,7 +379,7 @@ def teardown
379379

380380
result = TestResult.new('X034',"Conditional Update #{resource_class.name.demodulize}", nil, nil, nil)
381381
searchParams = { '_lastUpdated' => 'gt1900-01-01' }
382-
ignore_client_exception { @conditional_update_resource_b = ResourceGenerator.generate(@resource_class,3).conditional_update(searchParams) }
382+
ignore_client_exception { @conditional_update_resource_b = ResourceGenerator.generate(@resource_class,4).conditional_update(searchParams) }
383383

384384
if @client.reply.code==412
385385
result.update(STATUS[:pass], "Request correctly failed.", @client.reply.body)
@@ -500,7 +500,7 @@ def teardown
500500

501501
result = TestResult.new('X060',"Validate #{resource_class.name.demodulize}", nil, nil, nil)
502502

503-
tres = ResourceGenerator.generate(@resource_class,3)
503+
tres = ResourceGenerator.generate(@resource_class,4)
504504
reply = @client.validate tres
505505
if reply.code==200
506506
result.update(STATUS[:pass], "#{resource_class.name.demodulize} was validated.", reply.body)
@@ -635,7 +635,7 @@ def teardown
635635

636636
result = TestResult.new('X067',"Validate #{resource_class.name.demodulize} against a profile", nil, nil, nil)
637637

638-
tres = ResourceGenerator.generate(@resource_class,3)
638+
tres = ResourceGenerator.generate(@resource_class,4)
639639
reply = @client.validate(tres,{profile_uri: profile_uri})
640640
if reply.code==200
641641
result.update(STATUS[:pass], "#{resource_class.name.demodulize} was validated.", reply.body)

0 commit comments

Comments
 (0)