Skip to content

Commit

Permalink
Merge pull request #2232 from loft-sh/thomaskosiewski/add-missing-fro…
Browse files Browse the repository at this point in the history
…m-host-crd-check
  • Loading branch information
ThomasK33 authored Oct 16, 2024
2 parents 4e057eb + 217ab07 commit ce8c161
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func (c *Config) IsProFeatureEnabled() bool {
return true
}

if len(c.Sync.ToHost.CustomResources) > 0 {
if len(c.Sync.ToHost.CustomResources) > 0 || len(c.Sync.FromHost.CustomResources) > 0 {
return true
}

Expand Down
15 changes: 14 additions & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ func TestConfig_IsProFeatureEnabled(t *testing.T) {
expected: true,
},
{
name: "Custom Resource Syncing is configured",
name: "Custom Resource Syncing to host is configured",
config: &Config{
Sync: Sync{
ToHost: SyncToHost{
Expand All @@ -385,6 +385,19 @@ func TestConfig_IsProFeatureEnabled(t *testing.T) {
},
expected: true,
},
{
name: "Custom Resource Syncing from host is configured",
config: &Config{
Sync: Sync{
FromHost: SyncFromHost{
CustomResources: map[string]SyncFromHostCustomResource{
"demo": {},
},
},
},
},
expected: true,
},
}

for _, tt := range tests {
Expand Down

0 comments on commit ce8c161

Please sign in to comment.