Add tests for preupgradchecks and spec/archive CLI (#2874)
* Add tests for preupgradchecks * Add spec tests * Add package archive tests * Wait for cleanup * Fix test and coverage --------- Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -50,7 +50,7 @@ func (opts *DeleteSubCommand) do(input cli.Input) error {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Printf("Deleted archive with id: %s", archiveID)
|
||||
fmt.Printf("Deleted archive with id: %s\n", archiveID)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -66,12 +66,11 @@ func (opts *GetURLSubCommand) do(input cli.Input) error {
|
||||
storageType := resp.Header.Get("X-FISSION-STORAGETYPE")
|
||||
|
||||
if storageType == "local" {
|
||||
storageSvc, err := util.GetSvcName(input.Context(), opts.Client().KubernetesClient, "fission-storage")
|
||||
storagesvcURL, err := util.GetStorageURL(input.Context(), opts.Client())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
storagesvcURL := "http://" + storageSvc
|
||||
client := storagesvcClient.MakeClient(storagesvcURL)
|
||||
client := storagesvcClient.MakeClient(storagesvcURL.String())
|
||||
fmt.Printf("URL: %s", client.GetUrl(archiveID))
|
||||
} else if storageType == "s3" {
|
||||
storageBucket := resp.Header.Get("X-FISSION-BUCKET")
|
||||
|
||||
@@ -49,7 +49,6 @@ func (opts *UploadSubCommand) do(input cli.Input) error {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Printf("File successfully uploaded with ID: %s ", archiveID)
|
||||
|
||||
fmt.Fprintf(input.Stdout(), "File successfully uploaded with ID: %s\n", archiveID)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user