parseStreamingResponse is now unified for all objects under both versions
All checks were successful
test / test (push) Successful in 45s
All checks were successful
test / test (push) Successful in 45s
This commit is contained in:
parent
2909e0d1b4
commit
e38d7e84d5
12 changed files with 250 additions and 306 deletions
|
|
@ -317,16 +317,16 @@ func (rm *EdgeConnectResourceManager) restoreApp(ctx context.Context, backup *Ap
|
|||
appInput := &v2.NewAppInput{
|
||||
Region: backup.Region,
|
||||
App: v2.App{
|
||||
Key: backup.App.Key,
|
||||
Deployment: backup.App.Deployment,
|
||||
ImageType: backup.App.ImageType,
|
||||
ImagePath: backup.App.ImagePath,
|
||||
AllowServerless: backup.App.AllowServerless,
|
||||
DefaultFlavor: backup.App.DefaultFlavor,
|
||||
ServerlessConfig: backup.App.ServerlessConfig,
|
||||
DeploymentManifest: backup.App.DeploymentManifest,
|
||||
DeploymentGenerator: backup.App.DeploymentGenerator,
|
||||
RequiredOutboundConnections: backup.App.RequiredOutboundConnections,
|
||||
Key: backup.App.Key,
|
||||
Deployment: backup.App.Deployment,
|
||||
ImageType: backup.App.ImageType,
|
||||
ImagePath: backup.App.ImagePath,
|
||||
AllowServerless: backup.App.AllowServerless,
|
||||
DefaultFlavor: backup.App.DefaultFlavor,
|
||||
ServerlessConfig: backup.App.ServerlessConfig,
|
||||
DeploymentManifest: backup.App.DeploymentManifest,
|
||||
DeploymentGenerator: backup.App.DeploymentGenerator,
|
||||
RequiredOutboundConnections: backup.App.RequiredOutboundConnections,
|
||||
// Explicitly omit read-only fields like CreatedAt, UpdatedAt, Fields, etc.
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -343,8 +343,7 @@ func (p *EdgeConnectPlanner) getCurrentInstanceState(ctx context.Context, desire
|
|||
},
|
||||
}
|
||||
|
||||
appKey := v2.AppKey{ Name: desired.AppName}
|
||||
|
||||
appKey := v2.AppKey{Name: desired.AppName}
|
||||
|
||||
instance, err := p.client.ShowAppInstance(timeoutCtx, instanceKey, appKey, desired.Region)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -586,7 +586,7 @@ func (r *RecreateStrategy) backupInstance(ctx context.Context, action InstanceAc
|
|||
},
|
||||
}
|
||||
|
||||
appKey := v2.AppKey{ Name: action.Desired.AppName }
|
||||
appKey := v2.AppKey{Name: action.Desired.AppName}
|
||||
|
||||
instance, err := r.client.ShowAppInstance(ctx, instanceKey, appKey, action.Target.Region)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -70,13 +70,13 @@ func TestValidateExampleStructure(t *testing.T) {
|
|||
config := &EdgeConnectConfig{
|
||||
Kind: "edgeconnect-deployment",
|
||||
Metadata: Metadata{
|
||||
Name: "edge-app-demo",
|
||||
AppVersion: "1.0.0",
|
||||
Name: "edge-app-demo",
|
||||
AppVersion: "1.0.0",
|
||||
Organization: "edp2",
|
||||
},
|
||||
Spec: Spec{
|
||||
DockerApp: &DockerApp{ // Use DockerApp to avoid manifest file validation
|
||||
Image: "nginx:latest",
|
||||
Image: "nginx:latest",
|
||||
},
|
||||
InfraTemplate: []InfraTemplate{
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ func TestDeletionPlan_IsEmpty(t *testing.T) {
|
|||
{
|
||||
name: "empty plan with no resources",
|
||||
plan: &DeletionPlan{
|
||||
ConfigName: "test-config",
|
||||
AppToDelete: nil,
|
||||
ConfigName: "test-config",
|
||||
AppToDelete: nil,
|
||||
InstancesToDelete: []InstanceDeletion{},
|
||||
},
|
||||
expected: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue