Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodm committed Jul 25, 2023
1 parent ce7ff03 commit 7b04cdc
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 19 deletions.
4 changes: 2 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ func TestEndpoints(t *testing.T) {
{"/categories?include_policy_templates=foo", "/categories", "categories-include-policy-templates-error.txt", categoriesHandler(testLogger, indexer, testCacheTime)},
{"/categories?capabilities=observability,security&prerelease=true", "/categories", "categories-prerelease-capabilities-observability-security.json", categoriesHandler(testLogger, indexer, testCacheTime)},
{"/categories?capabilities=none&prerelease=true", "/categories", "categories-prerelease-capabilities-none.json", categoriesHandler(testLogger, indexer, testCacheTime)},
{"/categories?spec.min=1.1.0&spec.max=2.10.0&prerelease=true", "/categories", "categories-spec-min-max-2.10.0.json", categoriesHandler(testLogger, indexer, testCacheTime)},
{"/categories?spec.max=3.1.0&prerelease=true", "/categories", "categories-spec-default-min-max-3.1.0.json", categoriesHandler(testLogger, indexer, testCacheTime)},
{"/categories?spec.min=1.1.0&spec.max=2.10.0&prerelease=true", "/categories", "categories-spec-min-1.1.0-max-2.10.0.json", categoriesHandler(testLogger, indexer, testCacheTime)},
{"/categories?spec.max=2.10.0&prerelease=true", "/categories", "categories-spec-max-2.10.0.json", categoriesHandler(testLogger, indexer, testCacheTime)},
{"/search?kibana.version=6.5.2", "/search", "search-kibana652.json", searchHandler(testLogger, indexer, testCacheTime)},
{"/search?kibana.version=7.2.1", "/search", "search-kibana721.json", searchHandler(testLogger, indexer, testCacheTime)},
{"/search?kibana.version=8.0.0", "/search", "search-kibana800.json", searchHandler(testLogger, indexer, testCacheTime)},
Expand Down
17 changes: 0 additions & 17 deletions testdata/generated/categories-spec-default-min-max-3.1.0.json

This file was deleted.

58 changes: 58 additions & 0 deletions testdata/generated/categories-spec-max-2.10.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[
{
"id": "aws",
"title": "AWS",
"count": 2
},
{
"id": "azure",
"title": "Azure",
"count": 2
},
{
"id": "cloud",
"title": "Cloud",
"count": 1
},
{
"id": "containers",
"title": "Containers",
"count": 1
},
{
"id": "crm",
"title": "CRM",
"count": 2
},
{
"id": "custom",
"title": "Custom",
"count": 16
},
{
"id": "datastore",
"title": "Database",
"count": 3
},
{
"id": "message_queue",
"title": "Message Broker",
"count": 1,
"parent_id": "observability",
"parent_title": "Observability"
},
{
"id": "monitoring",
"title": "Monitoring",
"count": 3,
"parent_id": "observability",
"parent_title": "Observability"
},
{
"id": "web",
"title": "Web Server",
"count": 3,
"parent_id": "observability",
"parent_title": "Observability"
}
]

0 comments on commit 7b04cdc

Please sign in to comment.