forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pulsar-admin] allow create functions with package URL (apache#11666)
Fix apache#11665 ### Motivation Allow user to create function with package URL with pulsar-admin. ### Modifications - allow passing valid package URL from pulsar-admin functions - added tests
- Loading branch information
Showing
7 changed files
with
111 additions
and
28 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,9 +45,9 @@ public class PackagesCliTest extends TestRetrySupport { | |
public final void setup() throws Exception { | ||
incrementSetupNumber(); | ||
PulsarClusterSpec spec = PulsarClusterSpec.builder() | ||
.clusterName(String.format("%s-%s", clusterNamePrefix, RandomStringUtils.randomAlphabetic(6))) | ||
.brokerEnvs(getPackagesManagementServiceEnvs()) | ||
.build(); | ||
.clusterName(String.format("%s-%s", clusterNamePrefix, RandomStringUtils.randomAlphabetic(6))) | ||
.brokerEnvs(getPackagesManagementServiceEnvs()) | ||
.build(); | ||
pulsarCluster = PulsarCluster.forSpec(spec); | ||
pulsarCluster.start(); | ||
} | ||
|
@@ -88,13 +88,13 @@ public void testPackagesOperationsWithoutUploadingPackages() throws Exception { | |
public void testPackagesOperationsWithUploadingPackages() throws Exception { | ||
String testPackageName = "function://public/default/test@v1"; | ||
ContainerExecResult result = runPackagesCommand("upload", "--description", "a test package", | ||
"--path", PulsarCluster.ADMIN_SCRIPT, testPackageName); | ||
"--path", PulsarCluster.ADMIN_SCRIPT, testPackageName); | ||
assertEquals(result.getExitCode(), 0); | ||
|
||
BrokerContainer container = pulsarCluster.getBroker(0); | ||
String downloadFile = "tmp-file-" + RandomStringUtils.randomAlphabetic(8); | ||
String[] downloadCmd = new String[]{PulsarCluster.ADMIN_SCRIPT, "packages", "download", | ||
"--path", downloadFile, testPackageName}; | ||
"--path", downloadFile, testPackageName}; | ||
result = container.execCmd(downloadCmd); | ||
assertEquals(result.getExitCode(), 0); | ||
|
||
|
@@ -119,7 +119,7 @@ public void testPackagesOperationsWithUploadingPackages() throws Exception { | |
|
||
String contact = "[email protected]"; | ||
result = runPackagesCommand("update-metadata", "--description", "a test package", | ||
"--contact", contact, "-PpropertyA=A", testPackageName); | ||
"--contact", contact, "-PpropertyA=A", testPackageName); | ||
assertEquals(result.getExitCode(), 0); | ||
|
||
result = runPackagesCommand("get-metadata", testPackageName); | ||
|