fix(cli): Fixed tests after outputting plan diff
This commit is contained in:
parent
20e3afdf0d
commit
b712ae0869
2 changed files with 9 additions and 2 deletions
|
|
@ -391,8 +391,13 @@ func (p *EdgeConnectPlanner) compareAppStates(current, desired *AppState) ([]str
|
|||
// Compare outbound connections
|
||||
outboundChanges := p.compareOutboundConnections(current.OutboundConnections, desired.OutboundConnections)
|
||||
if len(outboundChanges) > 0 {
|
||||
changes = append(changes, "Outbound connections changed:")
|
||||
changes = append(changes, outboundChanges...)
|
||||
sb:= strings.Builder{}
|
||||
sb.WriteString("Outbound connections changed:\n")
|
||||
for _, change := range outboundChanges {
|
||||
sb.WriteString(change)
|
||||
sb.WriteString("\n")
|
||||
}
|
||||
changes = append(changes, sb.String())
|
||||
}
|
||||
|
||||
return changes, manifestChanged
|
||||
|
|
|
|||
|
|
@ -185,6 +185,7 @@ func TestPlanExistingDeploymentNoChanges(t *testing.T) {
|
|||
// Note: We would calculate expected manifest hash here when API supports it
|
||||
|
||||
// Mock existing app with same manifest hash and outbound connections
|
||||
manifestContent := "apiVersion: v1\nkind: Pod\nmetadata:\n name: test\n"
|
||||
existingApp := &edgeconnect.App{
|
||||
Key: edgeconnect.AppKey{
|
||||
Organization: "testorg",
|
||||
|
|
@ -192,6 +193,7 @@ func TestPlanExistingDeploymentNoChanges(t *testing.T) {
|
|||
Version: "1.0.0",
|
||||
},
|
||||
Deployment: "kubernetes",
|
||||
DeploymentManifest: manifestContent,
|
||||
RequiredOutboundConnections: []edgeconnect.SecurityRule{
|
||||
{
|
||||
Protocol: "tcp",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue