Commit Graph
1461 Commits
Author SHA1 Message Date
Jesse Glick dcfeaf3c2a OldDataMonitorTest.robustness consistently passes for me locally, but has been causing trouble in CI. Suppressing for now. 2014-04-03 12:29:13 -04:00
Jesse Glick dd5a3b1465 @RandomlyFails 2014-03-24 13:41:54 -04:00
Jesse Glick f82f0bb9f6 testEnterCredential observed to fail due to offline mirror.
Since downloading tool metadata seems inessential for the test, leaving it disabled as is the default.
503 Service Unavailable for http://mirrors.jenkins-ci.org/updates/updates/hudson.tasks.Ant.AntInstaller.json?id=hudson.tasks.Ant.AntInstaller&version=1.557-SNAPSHOT%2520(private-03%252F24%252F2014%252014%253A15%2520GMT-jenkins)
2014-03-24 11:55:54 -04:00
Jesse Glick 56b360d6f3 [JENKINS-19976] Touch-ups to PR #1054. 2014-03-24 10:10:52 -04:00
Jesse Glick df8df45c27 [FIXED JENKINS-19976] Merged #1054: fix class loading from dynamically installed optional dependencies. 2014-03-24 09:52:32 -04:00
Jesse Glick 681a8ff307 [FIXED JENKINS-19544] When OldDataMonitor is reported a Run, just remember the ID rather than holding a strong reference. 2014-03-21 18:58:03 -04:00
Jesse Glick 8508fc365a [JENKINS-19544] Whether or not we manage to save an object with old data, be sure to remove it from the list, and continue with other objects.
Otherwise a bug like JENKINS-20950 can prevent *anything* from being saved, and holds references to all the old data.
2014-03-21 18:13:51 -04:00
Jesse Glick 8861563bd1 [FIXED JENKINS-22262] CopyJobCommand and CreateJobCommand were doing incorrect permission checks. 2014-03-19 16:03:41 -04:00
Jesse Glick df9c92e461 Removed DownloadSettings.checkSignature; back to using a plain system property for this. 2014-03-17 12:48:24 -04:00
Jesse Glick db8d6508aa Merge branch 'master' into DownloadSettings-JENKINS-19081 2014-03-17 12:33:48 -04:00
Kohsuke Kawaguchi 0db32ecaa1 Clarifying assertions that they are trying to test. 2014-03-14 14:42:51 -07:00
Kohsuke Kawaguchi bd8234cceb Fixing a test failure.
The intent of this test is to make sure that a floating User object without any storage returns false from canDelete() method.
The earlier change made User.impersonate() to actually check if the user is a valid, so to make this test case work where it does
"user.impersonate" and "user2.impersonate2", I'm creating valid accounts for these two users.

Now what that means is that user2 is no longer a floating flyweight storage-less User, so it breaks the assumption of the
"User should not be able to delete because he is not saved." assertion.

To make this test case work, I'm introducing the 3rd user that is storage-less, and using it for the test.
2014-03-14 14:39:27 -07:00
Jesse Glick 2b6726290d Merge branch 'deconstructing-AbstractProject' 2014-03-14 13:29:11 -04:00
Kohsuke Kawaguchi f04b0e011a User.impersonate now requires that the user be a valid user.
These tests weren't using a SecurityRealm that recognizes these user names
2014-03-14 10:17:36 -07:00
Kohsuke Kawaguchi 2a78c10b94 Updating tests to fix more regressions 2014-03-14 10:17:36 -07:00
Kohsuke Kawaguchi 38ae112093 LastGrantedAuthoritiesProperty was missing a descriptor 2014-03-13 15:42:25 -07:00
Kohsuke Kawaguchi 16d0bc3fa9 More test fixes 2014-03-13 15:19:44 -07:00
Kohsuke Kawaguchi 664f7e3400 More test fixes 2014-03-13 13:31:04 -07:00
Kohsuke Kawaguchi e400bc7d94 Working toward fixing regressions.
So far none of them are real regressions but just that I needed to update tets
2014-03-13 12:48:27 -07:00
Kohsuke Kawaguchi ddf391cfec Updating test to fix failures.
Now that User.impersonate() actually checks if the user is valid, User.get("user").impersonate() is expected to fail.
Use a DummySecurityRealm to make this user a valid user.
2014-03-13 12:48:27 -07:00
Jesse Glick 5a01c0b7c5 Merge branch 'master' into deconstructing-AbstractProject 2014-03-13 10:37:21 -04:00
Kohsuke Kawaguchi 80b1cf9f8b Remember Me option doesn't always show. 2014-03-12 20:56:27 -07:00
Kohsuke Kawaguchi ce7e6390ee Adding the reload job functionality 2014-03-12 18:18:17 -07:00
Kohsuke Kawaguchi b478ca8904 Merge branch 'master' of github.com:jenkinsci/jenkins 2014-03-11 16:32:16 -07:00
Kohsuke Kawaguchi b078ac62f5 added another test for the basic remember-me flow 2014-03-11 16:22:40 -07:00
Kohsuke Kawaguchi 0e339d7a45 [JENKINS-20064]
Jenkins now remembers the authorities (read group memberships) that the user had carried when he/she last time interactively logged in.
This information is exposed via User.impersonate(), which is used when using Jenkins SSH, Jenkins CLI, or access via API tokens.

Previously this was impossible for a subset of SecurityRealms that does not allow us to read group membership information without
successful login (such as Active Directory, OpenID, etc.)

For security reasons, if the backend determines that the user does not exist (as opposed to the backend who cannot tell if the user
exists or not), then the impersonation will fail.

I need to check AD plugin is reporting a failure correctly in this case, before marking as JENKINS-20064 fixed.
2014-03-11 14:55:25 -07:00
Kohsuke Kawaguchi 86fcc4733d added a convenience method. 2014-03-11 14:21:46 -07:00
Kohsuke Kawaguchi 983ee33df1 added a convenience method 2014-03-11 14:12:27 -07:00
CloudBees DEV@Cloud f488ba8cbb Merge REMERGE_HEAD into HEAD 2014-03-11 19:39:52 +00:00
Kohsuke Kawaguchi 2dbd6eca7f [JENKINS-11643]
An unexpected failure in processing remember me cookie should be handled
gracefully. In particular, possibly problematic cookie should be
removed, or else the browser will keep bombarding the server with the
same cookie, and will never be able to get through.

It's much better to just drop the cookie.
2014-03-11 12:17:11 -07:00
Jesse Glick fb0ad71b71 Ensure that resolveDependencyJar works for NetBeans compile-on-save (and possibly other IDE’s similar features) even when plugin dependencies are snapshots (possibly in the reactor). 2014-03-11 14:15:26 -04:00
Jesse Glick d1b713a4d8 Renaming the newly introduced method avoids the need for an ambiguous overload. 2014-03-07 19:35:25 -08:00
Jesse Glick 9f19ae91f7 Introduced ParameterizedJobMixIn so that non-AbstractProject’s can use ParametersDefinitionProperty. 2014-03-07 11:44:28 -08:00
Jesse Glick 507d3a9fb7 Merge branch 'master' into DownloadSettings-JENKINS-19081
Conflicts:
	test/src/test/resources/hudson/model/update-center.json.html
2014-03-06 09:48:21 -08:00
Kohsuke Kawaguchi bd4f6bcf4c merged back the RC branch 2014-03-03 06:58:15 -08:00
Kohsuke Kawaguchi 7b0daade1f Timestamp has expired 2014-03-02 22:25:53 -08:00
Jesse Glick 00d27176f3 [FIXED JENKINS-22001] Simpler fix of JENKINS-19446 that does not introduce asynchronous behavior. 2014-02-28 14:34:29 -05:00
Jesse Glick 1c99cc1af0 May as well use new DownloadService.loadJSON method here. 2014-02-28 10:52:54 -05:00
Jesse Glick e4faf6950b Merge branch 'master' into DownloadSettings-JENKINS-19081
Conflicts:
	test/src/test/java/hudson/model/UpdateSiteTest.java
2014-02-28 10:46:55 -05:00
Jesse Glick 334ce1be69 [JENKINS-21984] Disabling cert check on updateDirectlyWithJson since the certificate is now expired, and it is no good to have a test which is known to start failing at a particular time in the future! 2014-02-28 10:45:38 -05:00
Jesse Glick c87b7daf79 [JENKINS-21984] Checking stable UC as well. Cannot reproduce certificate problem in test. 2014-02-28 10:44:55 -05:00
Jesse Glick d6b37a9457 Deleting failing test updateDirectlyWithHtml.
loadJSON does not support parsing HTML.
Nor should it need to, since UC URLs are supposed to be to the JSONP file.
The .html extension is added automatically by downloadService when postBack is supported.
2014-02-28 10:20:54 -05:00
Jesse Glick fb52414513 Testing the loadJSON method directly to make sure various JSONP formats are handled. 2014-02-28 10:19:15 -05:00
Jesse Glick 1ac77750e9 [FIXED JENKINS-19081] Offer the option of downloading metadata directly from the server. 2014-02-27 16:31:07 -05:00
Jesse Glick ef474202e5 @RandomlyFails 2014-02-26 18:42:54 -05:00
Jesse Glick 7c568178f3 [FIXED JENKINS-21958] FilePath.copyRecursiveTo given a scanner including a symlink but not any regular file in the same directory would neglect to create the parent directory on the destination and thus not copy the link.
(Util.createSymlink is partly to blame for not throwing a descriptive IOException when it fails to create a link,
but this is its historical behavior needed for compatibility.
copyRecursiveTo also continues to suppress error text from this method because there is nowhere for it to go.
Perhaps need a new variant of createSymlink that is guaranteed to either have created the link or throw an exception.)
2014-02-26 10:13:39 -05:00
Jesse Glick fdda9ca656 [FIXED JENKINS-16332] Ensure that User records are saved when the fullName is not recoverable from the id.
Otherwise User.get(id).getFullName() after restarting Jenkins will produce the wrong result.
2014-02-23 17:48:44 -05:00
Jesse Glick 3ec7e562fe Trying to diagnose recent CI failures of HtmlUnit calls.
For example https://jenkins.ci.cloudbees.com/job/core/job/jenkins-core-validated-merge/38/testReport/lib.layout/LayoutTest/rejectedLinks/ failed with:
java.io.IOException: GET http://localhost:52099/jenkins/login failed
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:152)
	at java.net.SocketInputStream.read(SocketInputStream.java:122)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
	at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
	at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
	at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
	at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
	at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
	at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:101)
	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1456)
	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1387)
	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:328)
	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:389)
	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:374)
	at org.jvnet.hudson.test.JenkinsRule$WebClient.goTo(JenkinsRule.java:1944)
	at org.jvnet.hudson.test.JenkinsRule$WebClient.goTo(JenkinsRule.java:1926)
	at lib.layout.LayoutTest.rejectedLinks(LayoutTest.java:44)
which makes little sense since the named IOException is actually thrown from HttpWebConnection.java:130.
Perhaps Surefire is not reporting the original cause correctly, conflating the wrapper’s message with the original stack trace.
As a temporary measure, printing the original stack trace to stderr if there is any.
2014-02-23 16:57:05 -05:00
Jesse Glick f360ce3ee0 Javadoc for Queue.Task claimed they were compared using .equals(), but in critical cases this was not actually true.
Does not matter for the common case of Job, but when implementing custom tasks this could cause duplicate queue items (and executables).
2014-02-20 11:05:32 -05:00
Jesse Glick b2c69b4a35 Split RawHtmlMarkupFormatter into a bundled plugin (antisamy-markup-formatter).
https://trello.com/c/NvZt4WXu/15-rawhtmlmarkupformatter
2014-02-17 12:22:53 -05:00