Project

General

Profile

« Previous | Next » 

Revision 7160

uncomment the MN tests (I bet this was an oversight during local testing)

View differences:

test/edu/ucsb/nceas/metacat/dataone/MNodeServiceTest.java
113 113
    TestSuite suite = new TestSuite();
114 114
    suite.addTest(new MNodeServiceTest("initialize"));
115 115
    // MNStorage tests
116
//    suite.addTest(new MNodeServiceTest("testCreate"));
117
//    suite.addTest(new MNodeServiceTest("testUpdate"));
118
//    suite.addTest(new MNodeServiceTest("testDelete"));
119
//    // MNRead tests
120
//    suite.addTest(new MNodeServiceTest("testGet"));
121
//    suite.addTest(new MNodeServiceTest("testGetChecksum"));
122
//    suite.addTest(new MNodeServiceTest("testGetSystemMetadata"));
123
//    suite.addTest(new MNodeServiceTest("testDescribe"));
124
//    suite.addTest(new MNodeServiceTest("testListObjects"));
125
//    suite.addTest(new MNodeServiceTest("testSynchronizationFailed"));
126
//    // MNCore tests
127
//    suite.addTest(new MNodeServiceTest("testPing"));
128
//    suite.addTest(new MNodeServiceTest("testGetLogRecords"));
129
//    suite.addTest(new MNodeServiceTest("testGetOperationStatistics"));
130
//    suite.addTest(new MNodeServiceTest("testGetCapabilities"));
131
//    // include these when they are part of the MN interface definitions
132
//    // suite.addTest(new MNodeServiceTest("testGetObjectStatistics"));
133
//    // suite.addTest(new MNodeServiceTest("testGetStatus"));
134
//    // MNAuthorization tests
135
//    suite.addTest(new MNodeServiceTest("testIsAuthorized"));
116
    suite.addTest(new MNodeServiceTest("testCreate"));
117
    suite.addTest(new MNodeServiceTest("testUpdate"));
118
    suite.addTest(new MNodeServiceTest("testDelete"));
119
    // MNRead tests
120
    suite.addTest(new MNodeServiceTest("testGet"));
121
    suite.addTest(new MNodeServiceTest("testGetChecksum"));
122
    suite.addTest(new MNodeServiceTest("testGetSystemMetadata"));
123
    suite.addTest(new MNodeServiceTest("testDescribe"));
124
    suite.addTest(new MNodeServiceTest("testListObjects"));
125
    suite.addTest(new MNodeServiceTest("testSynchronizationFailed"));
126
    // MNCore tests
127
    suite.addTest(new MNodeServiceTest("testPing"));
128
    suite.addTest(new MNodeServiceTest("testGetLogRecords"));
129
    suite.addTest(new MNodeServiceTest("testGetOperationStatistics"));
130
    suite.addTest(new MNodeServiceTest("testGetCapabilities"));
131
    // include these when they are part of the MN interface definitions
132
    // suite.addTest(new MNodeServiceTest("testGetObjectStatistics"));
133
    // suite.addTest(new MNodeServiceTest("testGetStatus"));
134
    // MNAuthorization tests
135
    suite.addTest(new MNodeServiceTest("testIsAuthorized"));
136 136
    suite.addTest(new MNodeServiceTest("testIsEquivIdentityAuthorized"));
137
//    suite.addTest(new MNodeServiceTest("testSetAccessPolicy"));
138
//    // MNreplication tests
139
//    suite.addTest(new MNodeServiceTest("testReplicate"));
137
    suite.addTest(new MNodeServiceTest("testSetAccessPolicy"));
138
    // MNreplication tests
139
    suite.addTest(new MNodeServiceTest("testReplicate"));
140 140
    
141 141
    
142 142
    return suite;
......
379 379
      Identifier pid = MNodeService.getInstance(request).create(session, guid, object, sysmeta);
380 380
      Identifier deletedPid = MNodeService.getInstance(request).delete(session, pid);
381 381
      assertEquals(pid.getValue(), deletedPid.getValue());
382
      // check that we cannot get the object
383
      InputStream deletedObject = null;
384
      try {
385
    	  deletedObject = MNodeService.getInstance(request).get(deletedPid);
386
      } catch (NotFound nf) {
387
    	  // this is expected
388
      }
389
	  assertNull(deletedObject);
382 390
      
383 391
    } catch (UnsupportedEncodingException e) {
384 392
      e.printStackTrace();

Also available in: Unified diff