Skip to content

Commit 7f9a1f9

Browse files
Fix functions download error (streamnative#897)
* Fix functions download error * Fix tests
1 parent 2cf64a2 commit 7f9a1f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/ctl/functions/download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func doDownloadFunctions(vc *cmdutils.VerbCmd, funcData *utils.FunctionData) err
127127
admin := cmdutils.NewPulsarClientWithAPIVersion(common.V3)
128128

129129
if funcData.Path != "" {
130-
err := admin.Functions().DownloadFunction(funcData.DestinationFile, funcData.Path)
130+
err := admin.Functions().DownloadFunction(funcData.Path, funcData.DestinationFile)
131131
if err != nil {
132132
return err
133133
}

pkg/ctl/functions/upload_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ func TestUploadAndDownloadCommands(t *testing.T) {
114114
downloadFilePath := "download-upload-file"
115115
args = []string{
116116
"download",
117-
"--destination-file", pulsarPath,
118-
"--path", downloadFilePath,
117+
"--destination-file", downloadFilePath,
118+
"--path", pulsarPath,
119119
}
120120
out, execErr, err = TestFunctionsCommands(downloadFunctionsCmd, args)
121121
defer os.RemoveAll(downloadFilePath)

0 commit comments

Comments
 (0)