Merge Boundary UI OSS branch 'main' at commit a0fe6c86f
This commit is contained in:
commit
ecd73b9ded
3 files changed
+49
-21
No files matched your search
@@ -132,9 +132,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) {
|
||||
|
||||
@@ -54,8 +54,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`
|
||||
@@ -63,13 +63,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;
|
||||
@@ -170,9 +170,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) {
|
||||
|
||||
@@ -63,6 +63,7 @@ test.describe('AWS', async () => {
|
||||
.getByRole('link', { name: hostCatalogName })
|
||||
).toBeVisible();
|
||||
|
||||
// Create first host set
|
||||
const hostSetName1 = 'Host Set ' + nanoid();
|
||||
await page.getByRole('link', { name: 'Host Sets' }).click();
|
||||
await page.getByRole('link', { name: 'New', exact: true }).click();
|
||||
@@ -94,6 +95,7 @@ test.describe('AWS', async () => {
|
||||
.getByRole('link', { name: 'Hosts' })
|
||||
).toBeVisible();
|
||||
|
||||
// Check number of hosts in host set
|
||||
let i = 0;
|
||||
let rowCount = 0;
|
||||
let hostsAreVisible = false;
|
||||
@@ -121,12 +123,37 @@ test.describe('AWS', async () => {
|
||||
if (!hostsAreVisible) {
|
||||
throw new Error(
|
||||
'Hosts are not visible. EXPECTED: ' +
|
||||
expectedHosts.length +
|
||||
', ACTUAL: ' +
|
||||
rowCount
|
||||
expectedHosts.length +
|
||||
', ACTUAL: ' +
|
||||
rowCount
|
||||
);
|
||||
}
|
||||
|
||||
// Navigate to each host in the host set
|
||||
for (let i = 0; i < expectedHosts.length; i++) {
|
||||
const host = await page
|
||||
.getByRole('table')
|
||||
.getByRole('rowgroup')
|
||||
.nth(1)
|
||||
.getByRole('row')
|
||||
.nth(i)
|
||||
.getByRole('link');
|
||||
|
||||
let hostName = await host.innerText();
|
||||
await host.click();
|
||||
await expect(
|
||||
page
|
||||
.getByRole('navigation', { name: 'breadcrumbs' })
|
||||
.getByRole('link', { name: hostName })
|
||||
).toBeVisible();
|
||||
|
||||
await page
|
||||
.getByRole('navigation', { name: 'breadcrumbs' })
|
||||
.getByRole('link', { name: hostSetName1 })
|
||||
.click();
|
||||
}
|
||||
|
||||
// Create second host set
|
||||
const hostSetName2 = 'Host Set ' + nanoid();
|
||||
await page
|
||||
.getByRole('navigation', { name: 'breadcrumbs' })
|
||||
@@ -155,6 +182,7 @@ test.describe('AWS', async () => {
|
||||
.getByRole('link', { name: hostSetName2 })
|
||||
).toBeVisible();
|
||||
|
||||
// Check number of hosts in host set
|
||||
await page.getByRole('link', { name: 'Hosts' }).click();
|
||||
i = 0;
|
||||
rowCount = 0;
|
||||
@@ -183,9 +211,9 @@ test.describe('AWS', async () => {
|
||||
if (!hostsAreVisible) {
|
||||
throw new Error(
|
||||
'Hosts are not visible. EXPECTED: ' +
|
||||
expectedHosts.length +
|
||||
', ACTUAL: ' +
|
||||
rowCount
|
||||
expectedHosts.length +
|
||||
', ACTUAL: ' +
|
||||
rowCount
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user