From a6a4eb731990b57b33bbe3449db73b5998215ea6 Mon Sep 17 00:00:00 2001 From: Tunatroll Date: Sat, 7 Mar 2026 09:30:25 -0700 Subject: [PATCH 1/2] Add grand-flip-out plugin with IP warning Added grand-flip-out plugin with repository details and warning. --- plugins/grand-flip-out | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 plugins/grand-flip-out diff --git a/plugins/grand-flip-out b/plugins/grand-flip-out new file mode 100644 index 000000000000..d68fcc708b2a --- /dev/null +++ b/plugins/grand-flip-out @@ -0,0 +1,3 @@ +repository=https://github.com/Tunatroll/grand-flip-out.git +commit=1d2649de4cb8cdac32a771b6e6fcb9396e32fdc1 +warning=This plugin submits your IP address to a 3rd-party server not controlled or verified by RuneLite developers. From 89672fecf68795f4ebcab47c60a75fda0ecb7973 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 22 May 2026 10:05:09 +0000 Subject: [PATCH 2/2] Add packager validation regression tests Co-authored-by: Tunatroll --- .../pluginhub/packager/PluginTest.java | 69 +++++++++++++++++++ .../uploader/UploadConfigurationTest.java | 26 +++++++ 2 files changed, 95 insertions(+) diff --git a/package/package/src/test/java/net/runelite/pluginhub/packager/PluginTest.java b/package/package/src/test/java/net/runelite/pluginhub/packager/PluginTest.java index 3aa33c51ff22..d38a948e838d 100644 --- a/package/package/src/test/java/net/runelite/pluginhub/packager/PluginTest.java +++ b/package/package/src/test/java/net/runelite/pluginhub/packager/PluginTest.java @@ -70,6 +70,75 @@ public void testCommitMustBeComplete() throws DisabledPluginException, IOExcepti } } + @Test + public void testRepositoryMustBeGithubCloneUrl() throws DisabledPluginException, IOException + { + try + { + newPlugin("test", "" + + "repository=https://gitlab.com/runelite/example-plugin.git\n" + + "commit=0000000000000000000000000000000000000000"); + Assert.fail(); + } + catch (PluginBuildException e) + { + log.info("ok: ", e); + assertContains(e.getMessage(), "repository is not an accepted url"); + assertContains(e.getHelpText(), "repositories must be hosted on GitHub.com"); + } + } + + @Test + public void testUnexpectedCommitDescriptorKeyFailsFast() throws DisabledPluginException, IOException + { + try + { + newPlugin("test", "" + + "repository=https://github.com/runelite/example-plugin.git\n" + + "commit=0000000000000000000000000000000000000000\n" + + "commmit=0000000000000000000000000000000000000000"); + Assert.fail(); + } + catch (PluginBuildException e) + { + log.info("ok: ", e); + assertContains(e.getMessage(), "unexpected key in commit descriptor"); + assertContains(e.getHelpText(), "commmit=0000000000000000000000000000000000000000"); + } + } + + @Test + public void testDisabledCommitDescriptorIsExcludedFromUnavailable() throws PluginBuildException, IOException + { + try + { + newPlugin("disabled-plugin", "disabled=legacy plugin is broken"); + Assert.fail(); + } + catch (DisabledPluginException e) + { + Assert.assertEquals("disabled-plugin", e.getInternalName()); + Assert.assertEquals("legacy plugin is broken", e.getReason()); + Assert.assertFalse(e.isIncludeInUnavailable()); + } + } + + @Test + public void testUnavailableCommitDescriptorIsIncludedInUnavailable() throws PluginBuildException, IOException + { + try + { + newPlugin("unavailable-plugin", "unavailable=requires unsupported upstream API"); + Assert.fail(); + } + catch (DisabledPluginException e) + { + Assert.assertEquals("unavailable-plugin", e.getInternalName()); + Assert.assertEquals("requires unsupported upstream API", e.getReason()); + Assert.assertTrue(e.isIncludeInUnavailable()); + } + } + @Test public void testExamplePluginCompiles() throws DisabledPluginException, PluginBuildException, IOException, InterruptedException { diff --git a/package/upload/src/test/java/net/runelite/pluginhub/uploader/UploadConfigurationTest.java b/package/upload/src/test/java/net/runelite/pluginhub/uploader/UploadConfigurationTest.java index 9cf089615be2..51f9746e7013 100644 --- a/package/upload/src/test/java/net/runelite/pluginhub/uploader/UploadConfigurationTest.java +++ b/package/upload/src/test/java/net/runelite/pluginhub/uploader/UploadConfigurationTest.java @@ -62,4 +62,30 @@ public void createClientWithCredentials() throws IOException, InterruptedExcepti RecordedRequest r2 = server.takeRequest(); Assert.assertEquals("Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==", r2.getHeader("Authorization")); } + + @Test + public void mkdirsCreatesMissingParentBeforeRetryingChild() throws IOException, InterruptedException + { + MockWebServer server = new MockWebServer(); + + server.enqueue(new MockResponse().setResponseCode(409)); + server.enqueue(new MockResponse().setResponseCode(201)); + server.enqueue(new MockResponse().setResponseCode(201)); + + UploadConfiguration uploadConfiguration = new UploadConfiguration() + .setClient("Aladdin:open sesame"); + + uploadConfiguration.mkdirs(server.url("/plugins/example")); + + RecordedRequest childAttempt = server.takeRequest(); + RecordedRequest parentAttempt = server.takeRequest(); + RecordedRequest childRetry = server.takeRequest(); + + Assert.assertEquals("MKCOL", childAttempt.getMethod()); + Assert.assertEquals("MKCOL", parentAttempt.getMethod()); + Assert.assertEquals("MKCOL", childRetry.getMethod()); + Assert.assertEquals("/plugins/example/%2F", childAttempt.getPath()); + Assert.assertEquals("/plugins/%2F", parentAttempt.getPath()); + Assert.assertEquals("/plugins/example/%2F", childRetry.getPath()); + } } \ No newline at end of file