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:
Sanket Sudake
2023-11-17 14:08:38 +05:30
committed by GitHub
parent e7d6381876
commit d23ed572f9
18 changed files with 186 additions and 77 deletions
+1 -1
View File
@@ -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
}
+2 -3
View File
@@ -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")
+1 -2
View File
@@ -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
}