-
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.
[Cloud Posture] test latest findings table sort (#144668)
- Loading branch information
Showing
17 changed files
with
329 additions
and
3 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
Validating CODEOWNERS rules …
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
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
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
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,34 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { resolve } from 'path'; | ||
import type { FtrConfigProviderContext } from '@kbn/test'; | ||
import { pageObjects } from './page_objects'; | ||
import { getPreConfiguredFleetPackages, getPreConfiguredAgentPolicies } from './helpers'; | ||
|
||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const xpackFunctionalConfig = await readConfigFile( | ||
require.resolve('../functional/config.base.js') | ||
); | ||
|
||
return { | ||
...xpackFunctionalConfig.getAll(), | ||
pageObjects, | ||
testFiles: [resolve(__dirname, './pages')], | ||
junit: { | ||
reportName: 'X-Pack Cloud Security Posture Functional Tests', | ||
}, | ||
kbnTestServer: { | ||
...xpackFunctionalConfig.get('kbnTestServer'), | ||
serverArgs: [ | ||
...xpackFunctionalConfig.get('kbnTestServer.serverArgs'), | ||
...getPreConfiguredFleetPackages(), | ||
...getPreConfiguredAgentPolicies(), | ||
], | ||
}, | ||
}; | ||
} |
13 changes: 13 additions & 0 deletions
13
x-pack/test/cloud_security_posture_functional/ftr_provider_context.d.ts
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 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { GenericFtrProviderContext } from '@kbn/test'; | ||
|
||
import { pageObjects } from './page_objects'; | ||
import { services } from '../functional/services'; | ||
|
||
export type FtrProviderContext = GenericFtrProviderContext<typeof services, typeof pageObjects>; |
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,27 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
const CLOUD_SECURITY_POSTURE_PACKAGE_NAME = 'cloud_security_posture'; | ||
|
||
/** | ||
* flags to load kibana with fleet pre-configured to have 'cloud_security_posture' integration installed | ||
*/ | ||
export const getPreConfiguredFleetPackages = () => [ | ||
`--xpack.fleet.packages.0.name=${CLOUD_SECURITY_POSTURE_PACKAGE_NAME}`, | ||
`--xpack.fleet.packages.0.version=latest`, | ||
]; | ||
|
||
/** | ||
* flags to load kibana with pre-configured agent policy with a 'cloud_security_posture' package policy | ||
*/ | ||
export const getPreConfiguredAgentPolicies = () => [ | ||
`--xpack.fleet.agentPolicies.0.id=agent-policy-csp`, | ||
`--xpack.fleet.agentPolicies.0.name=example-agent-policy-csp`, | ||
`--xpack.fleet.agentPolicies.0.package_policies.0.id=integration-policy-csp`, | ||
`--xpack.fleet.agentPolicies.0.package_policies.0.name=example-integration-csp`, | ||
`--xpack.fleet.agentPolicies.0.package_policies.0.package.name=${CLOUD_SECURITY_POSTURE_PACKAGE_NAME}`, | ||
]; |
Oops, something went wrong.