-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add multiple sample of valid and invalid queries
- Loading branch information
1 parent
0c67cc7
commit 2830580
Showing
9 changed files
with
196 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
tests/testdata/queries/invalid/sample_minimal_empty_parameter_default.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
metadata: | ||
version: 1 | ||
description: Fancy description for a sample query | ||
data_environments: | ||
- MyEnvironment | ||
data_families: | ||
- Data Family 1 | ||
- Data Family 2 | ||
defaults: | ||
parameters: | ||
parameter1: | ||
description: First Parameter | ||
type: str | ||
default: | ||
sources: | ||
query1: | ||
description: Description for the first query | ||
args: | ||
query: MyQuery |
13 changes: 13 additions & 0 deletions
13
tests/testdata/queries/invalid/sample_minimal_incorrect_version.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
metadata: | ||
version: "1" | ||
description: Fancy description for a sample query | ||
data_environments: | ||
- MyEnvironment | ||
data_families: | ||
- Data Family 1 | ||
- Data Family 2 | ||
sources: | ||
query1: | ||
description: Description for the first query | ||
args: | ||
query: MyQuery |
18 changes: 18 additions & 0 deletions
18
tests/testdata/queries/invalid/sample_minimal_invalid_parameter_type.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
metadata: | ||
version: 1 | ||
description: Fancy description for a sample query | ||
data_environments: | ||
- MyEnvironment | ||
data_families: | ||
- Data Family 1 | ||
- Data Family 2 | ||
defaults: | ||
parameters: | ||
parameter1: | ||
description: First Parameter | ||
type: string | ||
sources: | ||
query1: | ||
description: Description for the first query | ||
args: | ||
query: MyQuery |
21 changes: 21 additions & 0 deletions
21
tests/testdata/queries/invalid/sample_minimal_long_parameter_description.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
metadata: | ||
version: 1 | ||
description: Fancy description for a sample query | ||
data_environments: | ||
- MyEnvironment | ||
data_families: | ||
- Data Family 1 | ||
- Data Family 2 | ||
defaults: | ||
parameters: | ||
parameter1: | ||
description: |- | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce in felis tincidunt, posuere libero vehicula, accumsan ipsum. Nullam molestie dolor eu tellus sollicitudin consequat. Duis lobortis facilisis sapien, sit amet sagittis urna tempus eget. Donec luctus, erat in egestas mattis, tellus nunc elementum felis, ac suscipit lectus sapien ut magna. Donec id purus et urna cursus cursus nec eget neque. Donec id feugiat arcu. Ut aliquam et ipsum non tincidunt. Sed vehicula imperdiet mi, a ultrices ante vestibulum vitae. Sed vestibulum tortor tortor, a consequat dui ornare sed. In dui nibh, congue vitae nibh ut, facilisis suscipit ipsum. Integer iaculis neque in lobortis volutpat. Suspendisse tristique molestie nisi, nec molestie massa pulvinar sit amet. | ||
Proin sapien nulla, aliquet rhoncus libero eget, rhoncus eleifend arcu. Vestibulum vitae neque sollicitudin orci ultricies varius. Sed id eros elementum, molestie sapien et, mollis purus. Ut ac ultrices sapien, ac efficitur ipsum. Nunc nec aliquet mauris, nec fermentum arcu. Nulla facilisi. Morbi non commodo nulla. Fusce quis leo vitae leo commodo pulvinar vitae eget turpis. Vestibulum ultricies mauris quis urna facilisis, nec vestibulum enim cursus. Suspendisse ac convallis ligula. Nam non velit iaculis, viverra orci a, ornare leo. Sed ac porttitor risus. | ||
type: str | ||
sources: | ||
query1: | ||
description: Description for the first query | ||
args: | ||
query: MyQuery |
5 changes: 5 additions & 0 deletions
5
tests/testdata/queries/invalid/sample_minimal_missing_metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sources: | ||
query1: | ||
description: Description for the first query | ||
args: | ||
query: MyQuery |
8 changes: 8 additions & 0 deletions
8
tests/testdata/queries/invalid/sample_minimal_missing_sources.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
metadata: | ||
version: 1 | ||
description: Fancy description for a sample query | ||
data_environments: | ||
- MyEnvironment | ||
data_families: | ||
- Data Family 1 | ||
- Data Family 2 |
18 changes: 18 additions & 0 deletions
18
tests/testdata/queries/invalid/sample_minimal_short_parameter_description.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
metadata: | ||
version: 1 | ||
description: Fancy description for a sample query | ||
data_environments: | ||
- MyEnvironment | ||
data_families: | ||
- Data Family 1 | ||
- Data Family 2 | ||
defaults: | ||
parameters: | ||
parameter1: | ||
description: A | ||
type: str | ||
sources: | ||
query1: | ||
description: Description for the first query | ||
args: | ||
query: MyQuery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
metadata: | ||
version: 1 | ||
description: Fancy description for a sample query | ||
data_environments: | ||
- MyEnvironment | ||
data_families: | ||
- Data Family 1 | ||
- Data Family 2 | ||
tags: | ||
- alert | ||
- securityalert | ||
aliases: MyAlias | ||
cluster: MyCluster | ||
clusters: | ||
- MyCluster1 | ||
- MyCluster2 | ||
cluster_groups: | ||
- MyClusterGroup1 | ||
- MyClusterGroup2 | ||
database: MyDatabase | ||
defaults: | ||
metadata: | ||
data_source: security_alert | ||
data_families: | ||
- DataFamily1 | ||
- DataFamily2 | ||
pivot: | ||
myPivot: | ||
- pivot1 | ||
top: 42 | ||
parameters: | ||
parameter1: | ||
description: First Parameter | ||
type: str | ||
default: Default Value for Parameter 1 | ||
aliases: | ||
- param1 | ||
- p1 | ||
parameter2: | ||
description: Second Parameter | ||
type: datetime | ||
default: Default Value for Parameter 2 | ||
aliases: param2 | ||
parameter3: | ||
description: Third Parameter | ||
type: int | ||
parameter4: | ||
description: Fourth Parameter | ||
type: float | ||
sources: | ||
query1: | ||
description: Description for the first query | ||
metadata: | ||
version: 1 | ||
description: Fancy description for a sample query | ||
data_environments: MyEnvironment | ||
data_families: | ||
- SecurityAlert | ||
tags: | ||
- alert | ||
- securityalert | ||
aliases: MyAlias | ||
cluster: MyCluster | ||
clusters: | ||
- MyCluster1 | ||
- MyCluster2 | ||
cluster_groups: | ||
- MyClusterGroup1 | ||
- MyClusterGroup2 | ||
database: MyDatabase | ||
args: | ||
query: MyQuery | ||
uri: https://microsoft.com/ | ||
query_macros: | ||
macro1: | ||
description: Macro Description | ||
value: MyMacroValue | ||
parameters: | ||
parameter5: | ||
description: Fifth Parameter | ||
type: list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
metadata: | ||
version: 1 | ||
description: Fancy description for a sample query | ||
data_environments: | ||
- MyEnvironment | ||
data_families: | ||
- Data Family 1 | ||
- Data Family 2 | ||
sources: | ||
query1: | ||
description: Description for the first query | ||
args: | ||
query: MyQuery |