Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/shared/types/app_manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ type AppSettings struct {
FunctionRuntime FunctionRuntime `json:"function_runtime,omitempty" yaml:"function_runtime,flow,omitempty"`
TokenRotationEnabled *bool `json:"token_rotation_enabled,omitempty" yaml:"token_rotation_enabled,omitempty"`
SiwsLinks *SiwsLinks `json:"siws_links,omitempty" yaml:"siws_links,flow,omitempty"`
IsMCPEnabled *bool `json:"is_mcp_enabled,omitempty" yaml:"is_mcp_enabled,omitempty"`
}

type WorkflowStep struct {
Expand Down
35 changes: 35 additions & 0 deletions internal/shared/types/app_manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,41 @@ func Test_AppManifest_AppSettings_SiwsLinks(t *testing.T) {
}
}

func Test_AppManifest_AppSettings_IsMCPEnabled(t *testing.T) {
truth := true
tests := map[string]struct {
settings *AppSettings
expectedMCPValue *bool
expectedJSON string
}{
"undefined setting has no value": {
settings: &AppSettings{},
expectedMCPValue: nil,
expectedJSON: `{}`,
},
"defined setting has a value": {
settings: &AppSettings{IsMCPEnabled: &truth},
expectedMCPValue: &truth,
expectedJSON: `{"is_mcp_enabled":true}`,
},
}
for name, tc := range tests {
t.Run(name, func(t *testing.T) {
manifest := AppManifest{
Settings: tc.settings,
}
if tc.settings != nil {
actualJSON, err := json.Marshal(tc.settings)
require.NoError(t, err)
assert.Equal(t, tc.expectedJSON, string(actualJSON))
assert.Equal(t, tc.expectedMCPValue, manifest.Settings.IsMCPEnabled)
} else {
assert.Nil(t, manifest.Settings)
}
})
}
}

func Test_AppManifest_AppSettings_IncomingWebhooks(t *testing.T) {
falsity := false
expectedIncomingWebhooks := IncomingWebhooks{
Expand Down
Loading