mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 05:52:26 +00:00
merged back the RC branch
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@30703 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
57a59c535e
commit
617af7ded3
48 files changed
+68
-23
No files matched your search
@@ -39,19 +39,19 @@ public class UpdateCenterTest extends TestCase {
|
||||
public void testData() throws IOException {
|
||||
// check if we have the internet connectivity. See HUDSON-2095
|
||||
try {
|
||||
new URL("http://hudson-ci.org/").openStream();
|
||||
new URL("http://updates.hudson-labs.org/").openStream();
|
||||
} catch (IOException e) {
|
||||
System.out.println("Skipping this test. No internet connectivity");
|
||||
return;
|
||||
}
|
||||
|
||||
URL url = new URL("http://hudson-ci.org/update-center.json?version=build");
|
||||
URL url = new URL("http://updates.hudson-labs.org/update-center.json?version=build");
|
||||
String jsonp = IOUtils.toString(url.openStream());
|
||||
String json = jsonp.substring(jsonp.indexOf('(')+1,jsonp.lastIndexOf(')'));
|
||||
|
||||
UpdateSite us = new UpdateSite("default", url.toExternalForm());
|
||||
UpdateSite.Data data = us.new Data(JSONObject.fromObject(json));
|
||||
assertTrue(data.core.url.startsWith("http://hudson-ci.org/"));
|
||||
assertTrue(data.core.url.startsWith("http://updates.hudson-labs.org/"));
|
||||
assertTrue(data.plugins.containsKey("rake"));
|
||||
System.out.println(data.core.url);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user