-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Return useful data from /pluginManager/api/json by default #26351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
9193501
ee34d75
a54f9eb
ca4cdf2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -542,6 +542,37 @@ void pluginListJSONApi() throws Throwable { | |
| }); | ||
| } | ||
|
|
||
| @Issue("JENKINS-27993") | ||
MarkEWaite marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| @WithPlugin("htmlpublisher.jpi") | ||
| @Test | ||
| void pluginManagerApiJsonReturnsPluginDetails() throws Throwable { | ||
| session.then(r -> { | ||
| JSONObject response = r.getJSON("pluginManager/api/json").getJSONObject(); | ||
| JSONArray plugins = response.getJSONArray("plugins"); | ||
| assertThat(plugins, not(empty())); | ||
|
|
||
| // Find the htmlpublisher plugin in the response | ||
| JSONObject htmlPublisher = null; | ||
| for (int i = 0; i < plugins.size(); i++) { | ||
| JSONObject plugin = plugins.getJSONObject(i); | ||
| if ("htmlpublisher".equals(plugin.optString("shortName"))) { | ||
| htmlPublisher = plugin; | ||
| break; | ||
| } | ||
| } | ||
| assertNotNull(htmlPublisher, "htmlpublisher plugin should be present in API response"); | ||
|
|
||
| // Verify key properties are present at default depth (visibility = 2) | ||
| assertNotNull(htmlPublisher.optString("shortName", null), "shortName should be exported at default depth"); | ||
| assertNotNull(htmlPublisher.optString("version", null), "version should be exported at default depth"); | ||
| assertNotNull(htmlPublisher.optString("longName", null), "longName should be exported at default depth"); | ||
| assertNotNull(htmlPublisher.optString("displayName", null), "displayName should be exported at default depth"); | ||
| assertTrue(htmlPublisher.has("active"), "active should be exported at default depth"); | ||
| assertTrue(htmlPublisher.has("enabled"), "enabled should be exported at default depth"); | ||
| assertTrue(htmlPublisher.has("hasUpdate"), "hasUpdate should be exported at default depth"); | ||
|
Comment on lines
+565
to
+571
|
||
| }); | ||
| } | ||
|
|
||
| @Issue("JENKINS-41684") | ||
| @Test | ||
| void requireSystemDuringLoad() throws Throwable { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.