Skip to content

Commit

Permalink
Add multiple sample of valid and invalid queries
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianBracq committed Sep 5, 2023
1 parent 0c67cc7 commit 2830580
Show file tree
Hide file tree
Showing 9 changed files with 196 additions and 0 deletions.
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
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
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
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
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
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
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
81 changes: 81 additions & 0 deletions tests/testdata/queries/valid/sample_complete.yaml
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
13 changes: 13 additions & 0 deletions tests/testdata/queries/valid/sample_minimal.yaml
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

0 comments on commit 2830580

Please sign in to comment.