Refactor edition enablement (#1657)
* refactor: 💡 consolidate ssh features into ssh-target flag ✅ Closes: ICU-8383 * refactor: 💡 factor out base edition * feat: 🎸 dynamic feature edition enablement and toggling
This commit is contained in:
1 parent
bd6eee8eb3
commit
acd719140d
24 files changed
+303
-91
No files matched your search
@@ -137,9 +137,9 @@ test('Static Credential Store (User & Key Pair)', async ({ page }) => {
|
||||
if (process.env.E2E_SSH_USER != retrievedUser) {
|
||||
throw new Error(
|
||||
'Stored User does not match. EXPECTED: ' +
|
||||
process.env.E2E_SSH_USER +
|
||||
', ACTUAL: ' +
|
||||
retrievedUser
|
||||
process.env.E2E_SSH_USER +
|
||||
', ACTUAL: ' +
|
||||
retrievedUser
|
||||
);
|
||||
}
|
||||
if (keyData != retrievedKey) {
|
||||
|
||||
@@ -59,8 +59,8 @@ test('Vault Credential Store (User & Key Pair)', async ({ page }) => {
|
||||
execSync(`vault secrets enable -path=${secretsPath} kv-v2`);
|
||||
execSync(
|
||||
`vault kv put -mount ${secretsPath} ${secretName} ` +
|
||||
` username=${process.env.E2E_SSH_USER}` +
|
||||
` private_key=@${process.env.E2E_SSH_KEY_PATH}`
|
||||
` username=${process.env.E2E_SSH_USER}` +
|
||||
` private_key=@${process.env.E2E_SSH_KEY_PATH}`
|
||||
);
|
||||
execSync(
|
||||
`vault policy write ${secretPolicyName} ./tests/e2e/tests/fixtures/kv-policy.hcl`
|
||||
@@ -68,13 +68,13 @@ test('Vault Credential Store (User & Key Pair)', async ({ page }) => {
|
||||
const vaultToken = JSON.parse(
|
||||
execSync(
|
||||
`vault token create` +
|
||||
` -no-default-policy=true` +
|
||||
` -policy=${boundaryPolicyName}` +
|
||||
` -policy=${secretPolicyName}` +
|
||||
` -orphan=true` +
|
||||
` -period=20m` +
|
||||
` -renewable=true` +
|
||||
` -format=json`
|
||||
` -no-default-policy=true` +
|
||||
` -policy=${boundaryPolicyName}` +
|
||||
` -policy=${secretPolicyName}` +
|
||||
` -orphan=true` +
|
||||
` -period=20m` +
|
||||
` -renewable=true` +
|
||||
` -format=json`
|
||||
)
|
||||
);
|
||||
const clientToken = vaultToken.auth.client_token;
|
||||
@@ -175,9 +175,9 @@ test('Vault Credential Store (User & Key Pair)', async ({ page }) => {
|
||||
if (process.env.E2E_SSH_USER != retrievedUser) {
|
||||
throw new Error(
|
||||
'Stored User does not match. EXPECTED: ' +
|
||||
process.env.E2E_SSH_USER +
|
||||
', ACTUAL: ' +
|
||||
retrievedUser
|
||||
process.env.E2E_SSH_USER +
|
||||
', ACTUAL: ' +
|
||||
retrievedUser
|
||||
);
|
||||
}
|
||||
if (keyData != retrievedKey) {
|
||||
|
||||
@@ -128,9 +128,9 @@ test.describe('AWS', async () => {
|
||||
if (!hostsAreVisible) {
|
||||
throw new Error(
|
||||
'Hosts are not visible. EXPECTED: ' +
|
||||
expectedHosts.length +
|
||||
', ACTUAL: ' +
|
||||
rowCount
|
||||
expectedHosts.length +
|
||||
', ACTUAL: ' +
|
||||
rowCount
|
||||
);
|
||||
}
|
||||
|
||||
@@ -216,9 +216,9 @@ test.describe('AWS', async () => {
|
||||
if (!hostsAreVisible) {
|
||||
throw new Error(
|
||||
'Hosts are not visible. EXPECTED: ' +
|
||||
expectedHosts.length +
|
||||
', ACTUAL: ' +
|
||||
rowCount
|
||||
expectedHosts.length +
|
||||
', ACTUAL: ' +
|
||||
rowCount
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -61,18 +61,18 @@ test('Verify session created then cancel the session', async ({ page }) => {
|
||||
|
||||
connect = exec(
|
||||
'boundary connect' +
|
||||
' -target-id=' +
|
||||
target.id +
|
||||
' -exec /usr/bin/ssh --' +
|
||||
' -l ' +
|
||||
process.env.E2E_SSH_USER +
|
||||
' -i ' +
|
||||
process.env.E2E_SSH_KEY_PATH +
|
||||
' -o UserKnownHostsFile=/dev/null' +
|
||||
' -o StrictHostKeyChecking=no' +
|
||||
' -o IdentitiesOnly=yes' + // forces the use of the provided key
|
||||
' -p {{boundary.port}}' +
|
||||
' {{boundary.ip}}'
|
||||
' -target-id=' +
|
||||
target.id +
|
||||
' -exec /usr/bin/ssh --' +
|
||||
' -l ' +
|
||||
process.env.E2E_SSH_USER +
|
||||
' -i ' +
|
||||
process.env.E2E_SSH_KEY_PATH +
|
||||
' -o UserKnownHostsFile=/dev/null' +
|
||||
' -o StrictHostKeyChecking=no' +
|
||||
' -o IdentitiesOnly=yes' + // forces the use of the provided key
|
||||
' -p {{boundary.port}}' +
|
||||
' {{boundary.ip}}'
|
||||
);
|
||||
|
||||
await page
|
||||
|
||||
Reference in new issue
Block a user