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

Commit

Permalink
Skip some tests in TransactionAndBatchTest
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-a-o committed Nov 30, 2020
1 parent 11d88ec commit a302642
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions lib/tests/suites/transaction_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def teardown
validates resource: 'Observation', methods: ['create']
validates resource: nil, methods: ['transaction-system']
}
skip 'Could not create patient in XFER0.' unless @created_patient_record
assert @created_patient_record, 'Could not create patient in XFER0.'

# patient has gained weight
@obs1 = ResourceGenerator.minimal_observation('http://loinc.org','3141-9',250,'kg',@patient0.id, version_namespace)
Expand Down Expand Up @@ -165,7 +165,7 @@ def teardown
validates resource: 'Condition', methods: ['update']
validates resource: nil, methods: ['transaction-system']
}
skip 'Could not create patient in XFER0.' unless @created_patient_record
assert @created_patient_record, 'Could not create patient in XFER0.'

# weight
@obs2 = ResourceGenerator.minimal_observation('http://loinc.org','3141-9',100,'kg',@patient0.id, version_namespace)
Expand Down Expand Up @@ -209,7 +209,7 @@ def teardown
validates resource: 'Patient', methods: ['create']
validates resource: nil, methods: ['transaction-system']
}
skip 'Could not create patient in XFER0.' unless @created_patient_record
assert @created_patient_record, 'Could not create patient in XFER0.'

@patient1 = ResourceGenerator.minimal_patient(@patient0.identifier.first.value,@patient0.name.first.given.first, version_namespace)
reply = @client.create @patient1
Expand Down Expand Up @@ -240,7 +240,10 @@ def teardown
validates resource: 'Observation', methods: ['create','read','delete']
validates resource: nil, methods: ['transaction-system']
}
skip 'Could not create patient in XFER0.' unless @created_patient_record

skip 'TODO: https://github.com/FirelyTeam/spark/issues/305'

assert @created_patient_record, 'Could not create patient in XFER0.'

# height observation
@obs3 = ResourceGenerator.minimal_observation('http://loinc.org','8302-2',177,'cm',@patient0.id, version_namespace)
Expand Down Expand Up @@ -290,7 +293,10 @@ def teardown
validates resource: 'Patient', methods: ['$everything']
validates resource: nil, methods: ['transaction-system']
}
skip 'Could not create patient in XFER0.' unless @created_patient_record

skip 'TODO: https://github.com/FirelyTeam/spark/issues/304'

assert @created_patient_record, 'Could not create patient in XFER0.'

reply = @client.fetch_patient_record(@patient0.id, nil, nil, 'GET')
assert_response_ok(reply)
Expand Down Expand Up @@ -355,7 +361,7 @@ def teardown
validates resource: 'Condition', methods: ['delete']
validates resource: nil, methods: ['transaction-system']
}
skip 'Could not create patient in XFER0.' unless @created_patient_record
assert @created_patient_record, 'Could not create patient in XFER0.'

@client.begin_transaction
@client.add_transaction_request('DELETE', "Patient/#{@patient0.id}") if @patient0 && !@patient0.id.nil?
Expand Down Expand Up @@ -388,7 +394,7 @@ def teardown
validates resource: 'Condition', methods: ['delete']
validates resource: nil, methods: ['transaction-system']
}
skip 'Could not create patient in XFER0.' unless @created_patient_record
assert @created_patient_record, 'Could not create patient in XFER0.'

@client.begin_transaction
@client.add_transaction_request('DELETE', "Observation/#{@obs4.id}") if @obs4 && !@obs4.id.nil?
Expand Down Expand Up @@ -420,6 +426,8 @@ def teardown
validates resource: nil, methods: ['batch-system']
}

skip 'TODO: https://github.com/FirelyTeam/spark/issues/306'

@batch_patient = ResourceGenerator.minimal_patient("#{Time.now.to_i}",'Batch', version_namespace)
@batch_patient_id = "urn:uuid:#{SecureRandom.uuid}" # assign an id so related resources can reference the patient
# height
Expand Down Expand Up @@ -461,6 +469,8 @@ def teardown
validates resource: nil, methods: ['batch-system']
}

skip 'TODO: https://github.com/FirelyTeam/spark/issues/305'

@batch_patient_2 = ResourceGenerator.minimal_patient("#{Time.now.to_i}",'Batch', version_namespace)
reply = @client.create @batch_patient_2
assert_response_ok(reply)
Expand Down Expand Up @@ -505,9 +515,10 @@ def teardown
validates resource: 'Observation', methods: ['delete']
validates resource: nil, methods: ['batch-system']
}
skip 'Could not create necessary records in XFER11.' unless ((@batch_patient_2 && !@batch_patient_2.id.nil?) ||
(@batch_obs_2 && !@batch_obs_2.id.nil?) ||
(@batch_obs_3 && !@batch_obs_3.id.nil? ))

assert ((@batch_patient_2 && !@batch_patient_2.id.nil?) ||
(@batch_obs_2 && !@batch_obs_2.id.nil?) ||
(@batch_obs_3 && !@batch_obs_3.id.nil? )), 'Could not create necessary records in XFER11.'

@client.begin_batch
@client.add_batch_request('DELETE', "Observation/#{@batch_obs_3.id}") if @batch_obs_3 && !@batch_obs_3.id.nil?
Expand Down

0 comments on commit a302642

Please sign in to comment.