Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tiles): Remove geodatatiles config check which doesn't work in CRD #231

Merged
merged 1 commit into from
Sep 9, 2024
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
11 changes: 3 additions & 8 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,6 @@ func validate(config *Config) error {
if config.OgcAPI.Features != nil {
return validateFeatureCollections(config.OgcAPI.Features.Collections)
}
if config.OgcAPI.Tiles != nil && len(config.OgcAPI.Tiles.Collections) > 0 {
for _, coll := range config.OgcAPI.Tiles.Collections {
if coll.Tiles == nil {
return fmt.Errorf("invalid tiles config provided: no tileserver(s) "+
"configured for collection-level tiles. Collection: %s", coll.ID)
}
}
}
return nil
}

Expand Down Expand Up @@ -329,8 +321,10 @@ type GeoSpatialCollection struct {
}

type GeoSpatialCollectionJSON struct {
// Keep this in sync with the GeoSpatialCollection struct!
ID string `json:"id"`
Metadata *GeoSpatialCollectionMetadata `json:"metadata,omitempty"`
Links *CollectionLinks `json:"links,omitempty"`
*CollectionEntry3dGeoVolumes `json:",inline"`
*CollectionEntryTiles `json:",inline"`
*CollectionEntryFeatures `json:",inline"`
Expand All @@ -342,6 +336,7 @@ func (c GeoSpatialCollection) MarshalJSON() ([]byte, error) {
return json.Marshal(GeoSpatialCollectionJSON{
ID: c.ID,
Metadata: c.Metadata,
Links: c.Links,
CollectionEntry3dGeoVolumes: c.GeoVolumes,
CollectionEntryTiles: c.Tiles,
CollectionEntryFeatures: c.Features,
Expand Down
8 changes: 0 additions & 8 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ func TestNewConfig(t *testing.T) {
wantErr: true,
wantErrMsg: "validation for 'Version' failed on the 'semver' tag",
},
{
name: "fail on invalid config file for geodata tiles (collection-level tiles)",
args: args{
configFile: "internal/engine/testdata/config_invalid_geodatatiles.yaml",
},
wantErr: true,
wantErrMsg: "invalid tiles config provided: no tileserver(s) configured for collection-level tiles",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
27 changes: 0 additions & 27 deletions internal/engine/testdata/config_invalid_geodatatiles.yaml

This file was deleted.

Loading