-
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.
- Loading branch information
Showing
8 changed files
with
147 additions
and
17 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
36 changes: 36 additions & 0 deletions
36
...t_suites/entity_analytics/risk_engine/basic_license_essentials_tier/api_feature_access.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,36 @@ | ||
/* | ||
* 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 { riskEngineRouteHelpersFactory } from '../../utils'; | ||
import { FtrProviderContext } from '../../../../ftr_provider_context'; | ||
|
||
export default ({ getService }: FtrProviderContext) => { | ||
const supertest = getService('supertest'); | ||
const riskEngineRoutes = riskEngineRouteHelpersFactory(supertest); | ||
|
||
describe('@serverless essentials tier api access', () => { | ||
it('should not find init api', async () => { | ||
await riskEngineRoutes.init(404); | ||
}); | ||
|
||
it('should not find getStatus api', async () => { | ||
await riskEngineRoutes.getStatus(404); | ||
}); | ||
|
||
it('should not find enable api', async () => { | ||
await riskEngineRoutes.enable(404); | ||
}); | ||
|
||
it('should not find disable api', async () => { | ||
await riskEngineRoutes.disable(404); | ||
}); | ||
|
||
it('should not find privileges api', async () => { | ||
await riskEngineRoutes.privileges(404); | ||
}); | ||
}); | ||
}; |
30 changes: 30 additions & 0 deletions
30
...t_suites/entity_analytics/risk_engine/basic_license_essentials_tier/configs/ess.config.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,30 @@ | ||
/* | ||
* 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 { FtrConfigProviderContext } from '@kbn/test'; | ||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const functionalConfig = await readConfigFile( | ||
require.resolve('../../../../../config/ess/config.base.basic') | ||
); | ||
|
||
return { | ||
...functionalConfig.getAll(), | ||
kbnTestServer: { | ||
...functionalConfig.get('kbnTestServer'), | ||
serverArgs: [ | ||
...functionalConfig.get('kbnTestServer.serverArgs'), | ||
`--xpack.securitySolution.enableExperimental=${JSON.stringify([ | ||
'entityAnalyticsAssetCriticalityEnabled', | ||
])}`, | ||
], | ||
}, | ||
testFiles: [require.resolve('..')], | ||
junit: { | ||
reportName: 'Entity Analytics - Risk Engine Integration Tests - ESS Env - Basic License', | ||
}, | ||
}; | ||
} |
26 changes: 26 additions & 0 deletions
26
...s/entity_analytics/risk_engine/basic_license_essentials_tier/configs/serverless.config.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,26 @@ | ||
/* | ||
* 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 { createTestConfig } from '../../../../../config/serverless/config.base'; | ||
|
||
export default createTestConfig({ | ||
kbnTestServerArgs: [ | ||
`--xpack.securitySolution.enableExperimental=${JSON.stringify([ | ||
'entityAnalyticsAssetCriticalityEnabled', | ||
])}`, | ||
`--xpack.securitySolutionServerless.productTypes=${JSON.stringify([ | ||
{ product_line: 'security', product_tier: 'essentials' }, | ||
{ product_line: 'endpoint', product_tier: 'essentials' }, | ||
{ product_line: 'cloud', product_tier: 'essentials' }, | ||
])}`, | ||
], | ||
testFiles: [require.resolve('..')], | ||
junit: { | ||
reportName: | ||
'Entity Analytics - Risk Engine Integration Tests - Serverless Env - Essentials Tier', | ||
}, | ||
}); |
14 changes: 14 additions & 0 deletions
14
...tegration/test_suites/entity_analytics/risk_engine/basic_license_essentials_tier/index.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,14 @@ | ||
/* | ||
* 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 { FtrProviderContext } from '../../../../ftr_provider_context'; | ||
|
||
export default function ({ loadTestFile }: FtrProviderContext) { | ||
describe('Entity Analytics - Risk Engine', function () { | ||
loadTestFile(require.resolve('./api_feature_access')); | ||
}); | ||
} |
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