Skip to content

Commit

Permalink
[Cloud Security] Update CSP Version to 1.9.0 for Test (elastic#186657)
Browse files Browse the repository at this point in the history
## Summary

With 8.14 released, we want to make sure our CSP is using the latest CSP
version for our test environment
  • Loading branch information
animehart authored Jul 2, 2024
1 parent ad4fe84 commit 9fae9c5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/cloud_security_posture/common/constants.ts
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

0 comments on commit 9fae9c5

Please sign in to comment.