Revision 9293
Added by Jing Tao over 9 years ago
test/edu/ucsb/nceas/metacat/dataone/D1NodeVersionCheckerTest.java | ||
---|---|---|
169 | 169 |
} |
170 | 170 |
|
171 | 171 |
/** |
172 |
* Test getting a known object
|
|
172 |
* Test getting versions from different cns
|
|
173 | 173 |
*/ |
174 | 174 |
public void testGetVersion() throws Exception { |
175 | 175 |
Settings.getConfiguration().setProperty("D1Client.CN_URL", "https://cn-dev.test.dataone.org/cn"); |
... | ... | |
182 | 182 |
assertTrue(checker.getVersion("MNReplication") == null); |
183 | 183 |
assertTrue(checker.getVersion("CNRegister").equals("v1")); |
184 | 184 |
|
185 |
|
|
186 |
Settings.getConfiguration().setProperty("D1Client.CN_URL", "https://cn.dataone.org/cn"); |
|
187 |
node.setValue("urn:node:KNB"); |
|
188 |
checker = new D1NodeVersionChecker(node); |
|
189 |
assertTrue(checker.getVersion("MNReplication").equals("v1")); |
|
190 |
node.setValue("urn:node:CN"); |
|
191 |
checker = new D1NodeVersionChecker(node); |
|
192 |
assertTrue(checker.getVersion("MNReplication") == null); |
|
193 |
assertTrue(checker.getVersion("CNRegister").equals("v1")); |
|
185 | 194 |
} |
186 | 195 |
|
187 | 196 |
|
Also available in: Unified diff
Add a test case to test against a v1 cn.