-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add security-rule kibana assets to be checked by tests #1960
Conversation
internal/packages/assets.go
Outdated
@@ -159,7 +162,7 @@ func loadElasticsearchAssets(pkgRootPath string) ([]Asset, error) { | |||
} | |||
|
|||
func loadFileBasedAssets(kibanaAssetsFolderPath string, assetType AssetType) ([]Asset, error) { | |||
assetsFolderPath := filepath.Join(kibanaAssetsFolderPath, string(assetType)) | |||
assetsFolderPath := filepath.Join(kibanaAssetsFolderPath, strings.ReplaceAll(string(assetType), "-", "_")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Folder in packages is names security_rule
, but the type name is security-rule
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. Maybe add this as a comment to understand why we do the replace? Or maybe we could make AssetType
more explicit, with a type that contains the asset type name and the folder name.
test integrations |
Created or updated PR in integrations repository to test this version. Check elastic/integrations#10435 |
internal/packages/assets.go
Outdated
@@ -159,7 +162,7 @@ func loadElasticsearchAssets(pkgRootPath string) ([]Asset, error) { | |||
} | |||
|
|||
func loadFileBasedAssets(kibanaAssetsFolderPath string, assetType AssetType) ([]Asset, error) { | |||
assetsFolderPath := filepath.Join(kibanaAssetsFolderPath, string(assetType)) | |||
assetsFolderPath := filepath.Join(kibanaAssetsFolderPath, strings.ReplaceAll(string(assetType), "-", "_")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. Maybe add this as a comment to understand why we do the replace? Or maybe we could make AssetType
more explicit, with a type that contains the asset type name and the folder name.
test integrations |
Created or updated PR in integrations repository to test this version. Check elastic/integrations#10435 |
💚 Build Succeeded
History
cc @mrodm |
Follows #1915
Include
security-rule
assets into the assets checked byelastic-package test asset
.Those kibana assets are reported by the fleet API:
Example of response (truncated):