From 0c5ac1f101a65096666a6b8ac6de180ca4f48e1b Mon Sep 17 00:00:00 2001 From: Ian Littman Date: Tue, 1 Oct 2024 23:34:53 -0500 Subject: [PATCH] Add policy to testdata for script run --- pkg/spec/testdata/team_config.yml | 6 ++++++ pkg/spec/testdata/top.policies2.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/pkg/spec/testdata/team_config.yml b/pkg/spec/testdata/team_config.yml index 8d593283a09b..bffaab95139c 100644 --- a/pkg/spec/testdata/team_config.yml +++ b/pkg/spec/testdata/team_config.yml @@ -26,6 +26,12 @@ policies: resolution: There is no resolution for this policy. query: SELECT 1 FROM osquery_info WHERE start_time < 0; - path: ./team_install_software.policies.yml + - name: Script run policy + platform: linux + description: This should run a script on failure + query: SELECT * from osquery_info; + run_script: + - path: ./lib/collect-fleetd-logs.sh software: packages: - path: ./microsoft-teams.pkg.software.yml diff --git a/pkg/spec/testdata/top.policies2.yml b/pkg/spec/testdata/top.policies2.yml index 501a557b773a..3c0f826dd714 100644 --- a/pkg/spec/testdata/top.policies2.yml +++ b/pkg/spec/testdata/top.policies2.yml @@ -3,3 +3,5 @@ description: This policy should always fail. resolution: There is no resolution for this policy. query: SELECT 1 FROM osquery_info WHERE start_time < 0; + run_script: + - path: ./lib/collect-fleetd-logs.sh \ No newline at end of file