Skip to content

Commit 71566f3

Browse files
authored
[Cloud Security] Fixing FTR test for agentless default remove Beta badge from CSPM Agentless (elastic#208314)
1 parent b266caf commit 71566f3

File tree

6 files changed

+18
-59
lines changed

6 files changed

+18
-59
lines changed

x-pack/platform/plugins/private/translations/translations/fr-FR.json

-2
Original file line numberDiff line numberDiff line change
@@ -14776,8 +14776,6 @@
1477614776
"xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDescription": "Configurer l'intégration sans agent",
1477714777
"xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDisplay": "Sans agent",
1477814778
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay": "Sans agent",
14779-
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.label": "Bêta",
14780-
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.tooltip": "Cette fonctionnalité est en version d'évaluation technique et pourra être modifiée dans une future version. Nous vous remercions de bien vouloir nous aider en nous signalant tout bug.",
1478114779
"xpack.csp.fleetIntegration.setupTechnology.setupTechnologyLabel": "Technologie de configuration",
1478214780
"xpack.csp.fleetIntegration.setupTechnology.setupTechnologyPlaceholder": "Sélectionner la technologie de configuration",
1478314781
"xpack.csp.flyout.moreActionsButton": "Plus d'actions",

x-pack/platform/plugins/private/translations/translations/ja-JP.json

-2
Original file line numberDiff line numberDiff line change
@@ -14642,8 +14642,6 @@
1464214642
"xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDescription": "エージェントなしで統合を設定",
1464314643
"xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDisplay": "エージェントレス",
1464414644
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay": "エージェントレス",
14645-
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.label": "ベータ",
14646-
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.tooltip": "この機能はテクニカルプレビュー中であり、将来のリリースでは変更される場合があります。不具合が発生したら報告してください。",
1464714645
"xpack.csp.fleetIntegration.setupTechnology.setupTechnologyLabel": "セットアップ技術",
1464814646
"xpack.csp.fleetIntegration.setupTechnology.setupTechnologyPlaceholder": "セットアップ技術を選択",
1464914647
"xpack.csp.flyout.moreActionsButton": "さらにアクションを表示",

x-pack/platform/plugins/private/translations/translations/zh-CN.json

-2
Original file line numberDiff line numberDiff line change
@@ -14375,8 +14375,6 @@
1437514375
"xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDescription": "不使用代理设置集成",
1437614376
"xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDisplay": "无代理",
1437714377
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay": "无代理",
14378-
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.label": "公测版",
14379-
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.tooltip": "此功能处于技术预览状态,在未来版本中可能会发生更改。请通过报告错误来帮助我们。",
1438014378
"xpack.csp.fleetIntegration.setupTechnology.setupTechnologyLabel": "设置技术",
1438114379
"xpack.csp.fleetIntegration.setupTechnology.setupTechnologyPlaceholder": "选择设置技术",
1438214380
"xpack.csp.flyout.moreActionsButton": "更多操作",

x-pack/solutions/security/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/setup_technology_selector.tsx

+12-48
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,14 @@ import React from 'react';
99

1010
import { SetupTechnology } from '@kbn/fleet-plugin/public';
1111
import { FormattedMessage } from '@kbn/i18n-react';
12-
import { i18n } from '@kbn/i18n';
1312
import {
14-
EuiBetaBadge,
1513
EuiAccordion,
1614
EuiFormRow,
1715
EuiLink,
1816
EuiSpacer,
1917
EuiSuperSelect,
2018
EuiText,
2119
useGeneratedHtmlId,
22-
EuiFlexItem,
23-
EuiFlexGroup,
24-
useEuiTheme,
2520
} from '@elastic/eui';
2621
import {
2722
SETUP_TECHNOLOGY_SELECTOR_ACCORDION_TEST_SUBJ,
@@ -37,47 +32,6 @@ export const SetupTechnologySelector = ({
3732
setupTechnology: SetupTechnology;
3833
onSetupTechnologyChange: (value: SetupTechnology) => void;
3934
}) => {
40-
const { euiTheme } = useEuiTheme();
41-
const agentlessOptionBadge = (isDropDownDisplay: boolean) => {
42-
const title = isDropDownDisplay ? (
43-
<strong>
44-
<FormattedMessage
45-
id="xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDisplay"
46-
defaultMessage="Agentless"
47-
/>
48-
</strong>
49-
) : (
50-
<FormattedMessage
51-
id="xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay"
52-
defaultMessage="Agentless"
53-
/>
54-
);
55-
return (
56-
<EuiFlexGroup alignItems="center" responsive={false}>
57-
<EuiFlexItem grow={false}>{title}</EuiFlexItem>
58-
<EuiFlexItem css={{ paddingTop: !isDropDownDisplay ? euiTheme.size.xs : undefined }}>
59-
<EuiBetaBadge
60-
label={i18n.translate(
61-
'xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.label',
62-
{
63-
defaultMessage: 'Beta',
64-
}
65-
)}
66-
size="m"
67-
color="hollow"
68-
tooltipContent={i18n.translate(
69-
'xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.tooltip',
70-
{
71-
defaultMessage:
72-
'This functionality is in technical preview and may be changed in a future release. Please help us by reporting any bugs.',
73-
}
74-
)}
75-
/>
76-
</EuiFlexItem>
77-
</EuiFlexGroup>
78-
);
79-
};
80-
8135
const options = [
8236
{
8337
value: SetupTechnology.AGENT_BASED,
@@ -109,11 +63,21 @@ export const SetupTechnologySelector = ({
10963
},
11064
{
11165
value: SetupTechnology.AGENTLESS,
112-
inputDisplay: agentlessOptionBadge(false),
66+
inputDisplay: (
67+
<FormattedMessage
68+
id="xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay"
69+
defaultMessage="Agentless"
70+
/>
71+
),
11372
'data-test-subj': 'setup-technology-agentless-option',
11473
dropdownDisplay: (
11574
<>
116-
{agentlessOptionBadge(true)}
75+
<strong>
76+
<FormattedMessage
77+
id="xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDisplay"
78+
defaultMessage="Agentless"
79+
/>
80+
</strong>
11781
<EuiText size="s" color="subdued">
11882
<p>
11983
<FormattedMessage

x-pack/test/cloud_security_posture_functional/agentless/create_agent.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
2929
const AWS_SINGLE_ACCOUNT_TEST_ID = 'awsSingleTestId';
3030

3131
// Failing: See https://github.com/elastic/kibana/issues/208495
32-
describe.skip('Agentless cloud', function () {
32+
describe('Agentless cloud', function () {
3333
let cisIntegration: typeof pageObjects.cisAddIntegration;
3434
let cisIntegrationAws: typeof pageObjects.cisAddIntegration.cisAws;
3535
let mockApiServer: http.Server;
@@ -155,6 +155,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
155155
await cisIntegration.clickOptionButton(AWS_SINGLE_ACCOUNT_TEST_ID);
156156

157157
await cisIntegration.inputIntegrationName(integrationPolicyName);
158+
await cisIntegration.selectSetupTechnology('agent-based');
159+
await pageObjects.header.waitUntilLoadingHasFinished();
158160

159161
await cisIntegration.clickSaveButton();
160162
await pageObjects.header.waitUntilLoadingHasFinished();

x-pack/test/cloud_security_posture_functional/agentless/security_posture.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*/
77

88
import expect from '@kbn/expect';
9-
import type { FtrProviderContext } from '../ftr_provider_context';
109
import { AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION } from '../constants';
10+
import type { FtrProviderContext } from '../ftr_provider_context';
1111
// eslint-disable-next-line import/no-default-export
1212
export default function ({ getPageObjects, getService }: FtrProviderContext) {
1313
const testSubjects = getService('testSubjects');
@@ -27,7 +27,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
2727
const SETUP_TECHNOLOGY_SELECTOR = 'setup-technology-selector-accordion';
2828

2929
// Failing: See https://github.com/elastic/kibana/issues/208533
30-
describe.skip('Agentless Security Posture Integration Options', function () {
30+
describe('Agentless Security Posture Integration Options', function () {
3131
let cisIntegration: typeof pageObjects.cisAddIntegration;
3232

3333
before(async () => {
@@ -70,7 +70,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
7070
});
7171

7272
it(`should show cspm with agentless option`, async () => {
73-
// const integrationPolicyName = `cloud_security_posture-${new Date().toISOString()}`;
7473
await cisIntegration.navigateToAddIntegrationWithVersionPage(
7574
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
7675
);
@@ -82,7 +81,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
8281
const hasAgentBased = await testSubjects.exists(POLICY_NAME_FIELD);
8382

8483
expect(hasSetupTechnologySelector).to.be(true);
85-
expect(hasAgentBased).to.be(true);
84+
expect(hasAgentBased).to.be(false);
8685
});
8786
});
8887
}

0 commit comments

Comments
 (0)