Revision 5402
Added by berkley over 14 years ago
test/edu/ucsb/nceas/metacat/dataone/CrudServiceTest.java | ||
---|---|---|
87 | 87 |
public static Test suite() |
88 | 88 |
{ |
89 | 89 |
TestSuite suite = new TestSuite(); |
90 |
suite.addTest(new CrudServiceTest("initialize")); |
|
90 |
/*suite.addTest(new CrudServiceTest("initialize"));
|
|
91 | 91 |
suite.addTest(new CrudServiceTest("testSingletonAccessor")); |
92 | 92 |
suite.addTest(new CrudServiceTest("testCreateAndGet")); |
93 | 93 |
suite.addTest(new CrudServiceTest("testGetSystemMetadata")); |
... | ... | |
96 | 96 |
suite.addTest(new CrudServiceTest("testAccessControl")); |
97 | 97 |
suite.addTest(new CrudServiceTest("testGenerateMissingSystemMetadata")); |
98 | 98 |
suite.addTest(new CrudServiceTest("testGetLogRecords")); |
99 |
suite.addTest(new CrudServiceTest("testChecksumError")); |
|
99 |
suite.addTest(new CrudServiceTest("testChecksumError"));*/ |
|
100 |
suite.addTest(new CrudServiceTest("testPublicAccess")); |
|
100 | 101 |
return suite; |
101 | 102 |
} |
102 | 103 |
|
103 | 104 |
/** |
105 |
* test to make sure that get and listObjects methods are publicly accessible |
|
106 |
*/ |
|
107 |
public void testPublicAccess() |
|
108 |
{ |
|
109 |
try |
|
110 |
{ |
|
111 |
System.out.println("XXX"); |
|
112 |
AuthToken token = new AuthToken("public"); |
|
113 |
CrudService cs = CrudService.getInstance(); |
|
114 |
ObjectList ol = cs.listObjects(token, null, null, null); |
|
115 |
System.out.println("ol: " + ol.getCount()); |
|
116 |
assertTrue(ol.getCount() > 0); |
|
117 |
} |
|
118 |
catch(Exception e) |
|
119 |
{ |
|
120 |
fail("Error in testPublicAccess: " + e.getMessage()); |
|
121 |
} |
|
122 |
|
|
123 |
} |
|
124 |
|
|
125 |
/** |
|
104 | 126 |
* test for an error where the checksum algorithm gets appended onto the checksum. |
105 | 127 |
*/ |
106 | 128 |
public void testChecksumError() |
Also available in: Unified diff
test to check for public access to get and listObjects