Task #6250
CN methods return 500 ServiceFailure when called with bogus test data and without certificates
0%
Description
A number of the test for the Python CN Client currently fail due to 500 ServiceFailure responses from the server. The CN calls are not meant to complete successfully because they're performed with random values and without certificates, but the tests expect specific exceptions, such as 401 NotAuthorized when calling an API without a certificate.
While 500 ServiceFailure is not exactly a bug, it would be great to get an exception that relates to the actual issue with the request.
For instance, a call to CNIdentity.registerAccount() gives:
<?xml version="1.0" encoding="UTF-8"?>
Could not counstruct partial tree: Invalid name: Sidalcea
I'm not sure how many of APIs this applies to, but it's at least several of these:
CNCore.setObsoletedBy()
CNAuthorization.setRightsHolder()
CNAuthorization.isAuthorized()
CNIdentity.registerAccount()
CNIdentity.updateAccount()
CNIdentity.verifyAccount()
CNIdentity.getSubjectInfo()
CNIdentity.listSubjects()
CNIdentity.mapIdentity()
CNIdentity.removeMapIdentity()
CNIdentity.requestMapIdentity()
CNIdentity.confirmMapIdentity()
CNIdentity.denyMapIdentity()
CNIdentity.createGroup()
CNIdentity.addGroupMembers()
CNIdentity.removeGroupMembers()
CNReplication.setReplicationStatus()
CNReplication.updateReplicationMetadata()
CNReplication.setReplicationPolicy()
CNReplication.isNodeAuthorized()
CNRegister.updateNodeCapabilities()
CNRegister.register()
History
#1 Updated by Robert Waltz about 10 years ago
What is meant by valid dataONE types? A ServiceFailure is a valid DataONE response, though it may not be the correct response for unauthorized access with bogus data.
#2 Updated by Roger Dahl about 10 years ago
Good point, Robert. Updating the ticket description.
#3 Updated by Roger Dahl about 10 years ago
- Description updated (diff)
#4 Updated by Roger Dahl about 10 years ago
- Subject changed from CN methods fail with 500 ServiceFailure when called with bogus test data and without certificates to CN methods return 500 ServiceFailure when called with bogus test data and without certificates