Skip to content
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

[Cloud Security] Update CSP Version to 1.9.0 for Test #186657

Merged
merged 14 commits into from
Jul 2, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,6 @@ export const TEMPLATE_URL_ACCOUNT_TYPE_ENV_VAR = 'ACCOUNT_TYPE';
export const ORGANIZATION_ACCOUNT = 'organization-account';
export const SINGLE_ACCOUNT = 'single-account';

export const CLOUD_SECURITY_PLUGIN_VERSION = '1.8.1';
export const CLOUD_SECURITY_PLUGIN_VERSION = '1.9.0';
// Cloud Credentials Template url was implemented in 1.10.0-preview01. See PR - https://github.com/elastic/integrations/pull/9828
export const CLOUD_CREDENTIALS_PACKAGE_VERSION = '1.10.0-preview01';
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ function SecretInputField({
iconType="refresh"
iconSide="left"
size="xs"
data-test-subj={`button-replace-${fieldTestSelector}`}
>
<FormattedMessage
id="xpack.fleet.editPackagePolicy.stepConfigure.fieldSecretValueSetEditButton"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ export function AddCisIntegrationFormPageProvider({
return await (await checkBox.findByCssSelector(`input[id='${id}']`)).getAttribute('checked');
};

const getReplaceSecretButton = async (secretField: string) => {
return await testSubjects.find(`button-replace-${secretField}`);
};

return {
cisAzure,
cisAws,
Expand Down Expand Up @@ -311,5 +315,6 @@ export function AddCisIntegrationFormPageProvider({
getValueInEditPage,
isOptionChecked,
checkIntegrationPliAuthBlockExists,
getReplaceSecretButton,
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export default function (providerContext: FtrProviderContext) {
(await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) ===
directAccessKeyId
).to.be(true);
expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null);
});
});

Expand Down Expand Up @@ -159,6 +160,7 @@ export default function (providerContext: FtrProviderContext) {
(await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) ===
tempAccessSessionToken
).to.be(true);
expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null);
});
});

Expand Down Expand Up @@ -247,6 +249,7 @@ export default function (providerContext: FtrProviderContext) {
(await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) ===
directAccessKeyId
).to.be(true);
expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null);
});
});

Expand Down Expand Up @@ -283,6 +286,7 @@ export default function (providerContext: FtrProviderContext) {
(await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) ===
tempAccessSessionToken
).to.be(true);
expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,7 @@ export default function (providerContext: FtrProviderContext) {
CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID
)) === tenantId
).to.be(true);
expect(
(await cisIntegration.getValueInEditPage(
CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_SECRET
)) === clientSecret
).to.be(true);
expect(await cisIntegration.getReplaceSecretButton('client-secret')).to.not.be(null);
});
});

Expand Down Expand Up @@ -227,11 +223,7 @@ export default function (providerContext: FtrProviderContext) {
CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID
)) === tenantId
).to.be(true);
expect(
(await cisIntegration.getValueInEditPage(
CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_SECRET
)) === clientSecret
).to.be(true);
expect(await cisIntegration.getReplaceSecretButton('client-secret')).to.not.be(null);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export default function (providerContext: FtrProviderContext) {
(await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) ===
directAccessKeyId
).to.be(true);
expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null);
});
});

Expand Down Expand Up @@ -107,6 +108,7 @@ export default function (providerContext: FtrProviderContext) {
(await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) ===
tempAccessSessionToken
).to.be(true);
expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import { CLOUD_SECURITY_PLUGIN_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants';
import { createTestConfig } from '../../config.base';

export default createTestConfig({
Expand All @@ -14,7 +15,7 @@ export default createTestConfig({
},
kbnServerArgs: [
`--xpack.fleet.packages.0.name=cloud_security_posture`,
`--xpack.fleet.packages.0.version=1.5.2`,
`--xpack.fleet.packages.0.version=${CLOUD_SECURITY_PLUGIN_VERSION}`,
`--xpack.securitySolutionServerless.productTypes=${JSON.stringify([
{ product_line: 'security', product_tier: 'essentials' },
{ product_line: 'endpoint', product_tier: 'essentials' },
Expand Down
Loading