Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Nov 2, 2023
1 parent ce7e4db commit 35fd277
Show file tree
Hide file tree
Showing 25 changed files with 417 additions and 7 deletions.
2 changes: 1 addition & 1 deletion testdata/generated/categories-experimental.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{
"id": "custom",
"title": "Custom",
"count": 16
"count": 17
},
{
"id": "datastore",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{
"id": "custom",
"title": "Custom",
"count": 13
"count": 14
},
{
"id": "datastore",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{
"id": "custom",
"title": "Custom",
"count": 15
"count": 16
},
{
"id": "datastore",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{
"id": "custom",
"title": "Custom",
"count": 15
"count": 16
},
{
"id": "datastore",
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/categories-prerelease.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{
"id": "custom",
"title": "Custom",
"count": 16
"count": 17
},
{
"id": "datastore",
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/categories-spec-max-2.10.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{
"id": "custom",
"title": "Custom",
"count": 16
"count": 17
},
{
"id": "datastore",
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/categories.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{
"id": "custom",
"title": "Custom",
"count": 13
"count": 14
},
{
"id": "datastore",
Expand Down
47 changes: 47 additions & 0 deletions testdata/generated/package/agent_privileges/1.0.0/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "agent_privileges",
"title": "Agent Privileges",
"version": "1.0.0",
"release": "beta",
"description": "Test package-specified agent privileges",
"type": "solution",
"download": "/epr/agent_privileges/agent_privileges-1.0.0.zip",
"path": "/package/agent_privileges/1.0.0",
"conditions": {
"kibana": {
"version": ">=7.16.0"
}
},
"categories": [
"custom"
],
"format_version": "1.0.0",
"readme": "/package/agent_privileges/1.0.0/docs/README.md",
"license": "basic",
"assets": [
"/package/agent_privileges/1.0.0/manifest.yml",
"/package/agent_privileges/1.0.0/docs/README.md",
"/package/agent_privileges/1.0.0/data_stream/agent_privileges/manifest.yml",
"/package/agent_privileges/1.0.0/data_stream/agent_privileges/fields/base-fields.yml"
],
"data_streams": [
{
"type": "metrics",
"dataset": "agent_privileges.agent_privileges",
"title": "Agent privileges data stream",
"release": "beta",
"package": "agent_privileges",
"agent": {
"privileges": {
"root": true
}
},
"path": "agent_privileges"
}
],
"agent": {
"privileges": {
"root": true
}
}
}
109 changes: 109 additions & 0 deletions testdata/generated/package/example/1.2.0/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"name": "example",
"title": "Example Integration",
"version": "1.2.0",
"release": "ga",
"source": {
"license": "Elastic-2.0"
},
"description": "This is the example integration",
"type": "integration",
"download": "/epr/example/example-1.2.0.zip",
"path": "/package/example/1.2.0",
"conditions": {
"kibana": {
"version": "^7.16.0 || ^8.0.0"
},
"elastic": {
"subscription": "gold",
"capabilities": [
"security"
]
}
},
"owner": {
"github": "ruflin"
},
"categories": [
"crm",
"azure",
"cloud"
],
"format_version": "1.0.0",
"readme": "/package/example/1.2.0/docs/README.md",
"license": "gold",
"screenshots": [
{
"src": "/img/kibana-envoyproxy.jpg",
"path": "/package/example/1.2.0/img/kibana-envoyproxy.jpg",
"title": "IP Tables Ubiquity Dashboard",
"size": "1492x1464",
"type": "image/png"
}
],
"assets": [
"/package/example/1.2.0/manifest.yml",
"/package/example/1.2.0/docs/README.md",
"/package/example/1.2.0/img/icon.png",
"/package/example/1.2.0/img/kibana-envoyproxy.jpg",
"/package/example/1.2.0/data_stream/foo/manifest.yml",
"/package/example/1.2.0/kibana/dashboard/0c610510-5cbd-11e9-8477-077ec9664dbd.json",
"/package/example/1.2.0/kibana/visualization/0a994af0-5c9d-11e9-8477-077ec9664dbd.json",
"/package/example/1.2.0/kibana/visualization/36f872a0-5c03-11e9-85b4-19d0072eb4f2.json",
"/package/example/1.2.0/kibana/visualization/38f96190-5c99-11e9-8477-077ec9664dbd.json",
"/package/example/1.2.0/kibana/visualization/7e4084e0-5c99-11e9-8477-077ec9664dbd.json",
"/package/example/1.2.0/kibana/visualization/80844540-5c97-11e9-8477-077ec9664dbd.json",
"/package/example/1.2.0/kibana/visualization/ab48c3f0-5ca6-11e9-8477-077ec9664dbd.json",
"/package/example/1.2.0/data_stream/foo/fields/base-fields.yml",
"/package/example/1.2.0/data_stream/foo/agent/stream/stream.yml.hbs",
"/package/example/1.2.0/data_stream/foo/elasticsearch/ingest_pipeline/pipeline-entry.json",
"/package/example/1.2.0/data_stream/foo/elasticsearch/ingest_pipeline/pipeline-http.json",
"/package/example/1.2.0/data_stream/foo/elasticsearch/ingest_pipeline/pipeline-json.json",
"/package/example/1.2.0/data_stream/foo/elasticsearch/ingest_pipeline/pipeline-plaintext.json",
"/package/example/1.2.0/data_stream/foo/elasticsearch/ingest_pipeline/pipeline-tcp.json"
],
"policy_templates": [
{
"name": "logs",
"title": "Logs datasource",
"description": "Datasource for your log files.",
"inputs": [
{
"type": "foo"
}
],
"multiple": true,
"categories": [
"datastore"
]
}
],
"data_streams": [
{
"type": "logs",
"dataset": "example.foo",
"title": "Foo",
"release": "ga",
"ingest_pipeline": "pipeline-entry",
"streams": [
{
"input": "foo",
"vars": [
{
"name": "paths",
"type": "text",
"description": "Path to log files to be collected",
"multi": true,
"required": true,
"show_user": false
}
],
"template_path": "stream.yml.hbs",
"enabled": true
}
],
"package": "example",
"path": "foo"
}
]
}
18 changes: 18 additions & 0 deletions testdata/generated/search-all-proxy.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
[
{
"name": "agent_privileges",
"title": "Agent Privileges",
"version": "1.0.0",
"release": "beta",
"description": "Test package-specified agent privileges",
"type": "solution",
"download": "/epr/agent_privileges/agent_privileges-1.0.0.zip",
"path": "/package/agent_privileges/1.0.0",
"conditions": {
"kibana": {
"version": ">=7.16.0"
}
},
"categories": [
"custom"
]
},
{
"name": "datasources",
"title": "Default datasource Integration",
Expand Down
18 changes: 18 additions & 0 deletions testdata/generated/search-all.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
[
{
"name": "agent_privileges",
"title": "Agent Privileges",
"version": "1.0.0",
"release": "beta",
"description": "Test package-specified agent privileges",
"type": "solution",
"download": "/epr/agent_privileges/agent_privileges-1.0.0.zip",
"path": "/package/agent_privileges/1.0.0",
"conditions": {
"kibana": {
"version": ">=7.16.0"
}
},
"categories": [
"custom"
]
},
{
"name": "datasources",
"title": "Default datasource Integration",
Expand Down
18 changes: 18 additions & 0 deletions testdata/generated/search-category-custom.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
[
{
"name": "agent_privileges",
"title": "Agent Privileges",
"version": "1.0.0",
"release": "beta",
"description": "Test package-specified agent privileges",
"type": "solution",
"download": "/epr/agent_privileges/agent_privileges-1.0.0.zip",
"path": "/package/agent_privileges/1.0.0",
"conditions": {
"kibana": {
"version": ">=7.16.0"
}
},
"categories": [
"custom"
]
},
{
"name": "datasources",
"title": "Default datasource Integration",
Expand Down
18 changes: 18 additions & 0 deletions testdata/generated/search-just-latest-proxy.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
[
{
"name": "agent_privileges",
"title": "Agent Privileges",
"version": "1.0.0",
"release": "beta",
"description": "Test package-specified agent privileges",
"type": "solution",
"download": "/epr/agent_privileges/agent_privileges-1.0.0.zip",
"path": "/package/agent_privileges/1.0.0",
"conditions": {
"kibana": {
"version": ">=7.16.0"
}
},
"categories": [
"custom"
]
},
{
"name": "datasources",
"title": "Default datasource Integration",
Expand Down
18 changes: 18 additions & 0 deletions testdata/generated/search-kibana800.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
[
{
"name": "agent_privileges",
"title": "Agent Privileges",
"version": "1.0.0",
"release": "beta",
"description": "Test package-specified agent privileges",
"type": "solution",
"download": "/epr/agent_privileges/agent_privileges-1.0.0.zip",
"path": "/package/agent_privileges/1.0.0",
"conditions": {
"kibana": {
"version": ">=7.16.0"
}
},
"categories": [
"custom"
]
},
{
"name": "datasources",
"title": "Default datasource Integration",
Expand Down
18 changes: 18 additions & 0 deletions testdata/generated/search-package-experimental.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
[
{
"name": "agent_privileges",
"title": "Agent Privileges",
"version": "1.0.0",
"release": "beta",
"description": "Test package-specified agent privileges",
"type": "solution",
"download": "/epr/agent_privileges/agent_privileges-1.0.0.zip",
"path": "/package/agent_privileges/1.0.0",
"conditions": {
"kibana": {
"version": ">=7.16.0"
}
},
"categories": [
"custom"
]
},
{
"name": "datastream_without_release",
"title": "Apache Spark",
Expand Down
18 changes: 18 additions & 0 deletions testdata/generated/search-package-internal.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
[
{
"name": "agent_privileges",
"title": "Agent Privileges",
"version": "1.0.0",
"release": "beta",
"description": "Test package-specified agent privileges",
"type": "solution",
"download": "/epr/agent_privileges/agent_privileges-1.0.0.zip",
"path": "/package/agent_privileges/1.0.0",
"conditions": {
"kibana": {
"version": ">=7.16.0"
}
},
"categories": [
"custom"
]
},
{
"name": "datasources",
"title": "Default datasource Integration",
Expand Down
Loading

0 comments on commit 35fd277

Please sign in to comment.