kibana/x-pack/test/cloud_security_posture_api/config.ts
Kfir Peled 2c5544cfc8
[Cloud Security] Bug fix - show origin event's with primary color instead of danger (#204425)
## Summary

Bug description:

**Actual:** The node's color is red when exploring events through
Explore or Timeline.
**The expected** color of events is blue.

Before:


![385007418-f0a6bd7e-dbc9-43ad-99b8-a07bcad85075](https://github.com/user-attachments/assets/7bf198f3-9a32-4d27-84db-3e97b5bf312b)

After:



https://github.com/user-attachments/assets/f1a10deb-65f5-43be-a351-6fca34f855cb


https://github.com/user-attachments/assets/223534f4-09a2-4b41-85bc-c2195dd153ba

**How to test this PR:**

- Enable the feature flag 

`kibana.dev.yml`:

```yaml
uiSettings.overrides.securitySolution:enableVisualizationsInFlyout: true
xpack.securitySolution.enableExperimental: ['graphVisualizationInFlyoutEnabled']
```

- Load mocked data:

```bash
node scripts/es_archiver load x-pack/test/cloud_security_posture_functional/es_archives/logs_gcp_audit \ 
  --es-url http://elastic:changeme@localhost:9200 \
  --kibana-url http://elastic:changeme@localhost:5601

node scripts/es_archiver load x-pack/test/cloud_security_posture_functional/es_archives/security_alerts \
  --es-url http://elastic:changeme@localhost:9200 \
  --kibana-url http://elastic:changeme@localhost:5601
```

- Make sure you include data from Oct 13 2024. (in the video I use Last
year)


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2024-12-17 16:17:05 +00:00

51 lines
2.3 KiB
TypeScript

/*
* 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 { getKibanaCliLoggers, type FtrConfigProviderContext } from '@kbn/test';
import { CLOUD_SECURITY_PLUGIN_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts'));
return {
...xPackAPITestsConfig.getAll(),
testFiles: [resolve(__dirname, './routes'), resolve(__dirname, './telemetry')],
junit: {
reportName: 'X-Pack Cloud Security Posture API Tests',
},
kbnTestServer: {
...xPackAPITestsConfig.get('kbnTestServer'),
serverArgs: [
...xPackAPITestsConfig.get('kbnTestServer.serverArgs'),
`--logging.loggers=${JSON.stringify([
...getKibanaCliLoggers(xPackAPITestsConfig.get('kbnTestServer.serverArgs')),
{
name: 'plugins.cloudSecurityPosture',
level: 'all',
appenders: ['default'],
},
])}`,
/**
* Package version is fixed (not latest) so FTR won't suddenly break when package is changed.
*
* test a new package:
* 1. build the package and start the registry with elastic-package and uncomment the 'registryUrl' flag below
* 2. locally checkout the kibana version that matches the new package
* 3. update the package version below to use the new package version
* 4. run tests with NODE_EXTRA_CA_CERTS pointing to the elastic-package certificate. example:
* NODE_EXTRA_CA_CERTS=HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem yarn start
* 5. when test pass:
* 1. release a new package to EPR
* 2. merge the updated version number change to kibana
*/
`--xpack.fleet.packages.0.name=cloud_security_posture`,
`--xpack.fleet.packages.0.version=${CLOUD_SECURITY_PLUGIN_VERSION}`,
// `--xpack.fleet.registryUrl=https://localhost:8080`,
],
},
};
}