-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] Improve Integration Tests for Package Policy Upgrade API (#10…
…9448) (#109699) * Improve integration tests + fix various error cases for package policy upgrade API * Fix test name * Throw string error when validation fails instead of array * Update validatePackagePolicy tests to include bool check * Address PR feedback + use IngestError class Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kyle Pollich <[email protected]>
- Loading branch information
1 parent
e87ef74
commit f047b20
Showing
19 changed files
with
489 additions
and
70 deletions.
There are no files selected for viewing
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
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
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -6,6 +6,5 @@ streams: | |
- name: test_var | ||
type: text | ||
title: Test Var | ||
required: true | ||
show_user: true | ||
default: Test Value |
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
...ixtures/test_packages/package_policy_upgrade/0.2.0-add-non-required-test-var/manifest.yml
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,23 @@ | ||
format_version: 1.0.0 | ||
name: package_policy_upgrade | ||
title: Tests package policy upgrades | ||
description: This is a test package for upgrading package policies | ||
version: 0.2.0-add-non-required-test-var | ||
categories: [] | ||
release: beta | ||
type: integration | ||
license: basic | ||
requirement: | ||
elasticsearch: | ||
versions: '>7.7.0' | ||
kibana: | ||
versions: '>7.7.0' | ||
policy_templates: | ||
- name: package_policy_upgrade | ||
title: Package Policy Upgrade | ||
description: Test Package for Upgrading Package Policies | ||
inputs: | ||
- type: test_input | ||
title: Test Input | ||
description: Test Input | ||
enabled: true |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
1 change: 1 addition & 0 deletions
1
...grade/0.4.0-add-test-var-as-bool/data_stream/test_stream/agent/stream/test_stream.yml.hbs
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 @@ | ||
config.version: "2" |
16 changes: 16 additions & 0 deletions
16
...ckage_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/fields/fields.yml
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,16 @@ | ||
- name: data_stream.type | ||
type: constant_keyword | ||
description: > | ||
Data stream type. | ||
- name: data_stream.dataset | ||
type: constant_keyword | ||
description: > | ||
Data stream dataset. | ||
- name: data_stream.namespace | ||
type: constant_keyword | ||
description: > | ||
Data stream namespace. | ||
- name: '@timestamp' | ||
type: date | ||
description: > | ||
Event timestamp. |
10 changes: 10 additions & 0 deletions
10
...es/package_policy_upgrade/0.4.0-add-test-var-as-bool/data_stream/test_stream/manifest.yml
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,10 @@ | ||
title: Test stream | ||
type: logs | ||
streams: | ||
- input: test_input | ||
vars: | ||
- name: test_var | ||
type: bool | ||
title: Test Var | ||
required: true | ||
show_user: true |
3 changes: 3 additions & 0 deletions
3
.../test_packages/package_policy_upgrade/0.4.0-add-test-var-as-bool/docs/README.md
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,3 @@ | ||
# Test package | ||
|
||
This is a test package for testing automated upgrades for package policies |
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
Oops, something went wrong.