feat(sdk): The deploy app example is now working
This commit is contained in:
parent
1bd9105b07
commit
14123cec3d
4 changed files with 17 additions and 13 deletions
|
|
@ -9,6 +9,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"edp.buildth.ing/DevFW-CICD/edge-connect-client/sdk/client"
|
||||
|
|
@ -55,10 +56,12 @@ func main() {
|
|||
Name: "my-edge-app",
|
||||
Version: "1.0.0",
|
||||
},
|
||||
Deployment: "docker",
|
||||
ImageType: "ImageTypeDocker",
|
||||
ImagePath: "nginx:latest",
|
||||
DefaultFlavor: client.Flavor{Name: "EU.small"},
|
||||
Deployment: "docker",
|
||||
ImageType: "ImageTypeDocker",
|
||||
ImagePath: "https://registry-1.docker.io/library/nginx:latest",
|
||||
DefaultFlavor: client.Flavor{Name: "EU.small"},
|
||||
ServerlessConfig: struct{}{},
|
||||
AllowServerless: false,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +116,7 @@ func demonstrateAppLifecycle(ctx context.Context, edgeClient *client.Client, inp
|
|||
fmt.Println("\n5. Verifying deletion...")
|
||||
_, err = edgeClient.ShowApp(ctx, appKey, region)
|
||||
if err != nil {
|
||||
if fmt.Sprintf("%v", err) == client.ErrResourceNotFound.Error() {
|
||||
if strings.Contains(fmt.Sprintf("%v", err), client.ErrResourceNotFound.Error()) {
|
||||
fmt.Printf("✅ App successfully deleted (not found)\n")
|
||||
} else {
|
||||
return fmt.Errorf("unexpected error verifying deletion: %w", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue