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

Alter default outbound Networking options #619 #631

Merged
merged 4 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions helper/.playwrighttests/helper-test-managednatgw.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { matchers } = require('playwright-expect');
// add custom matchers
expect.extend(matchers);

test('managed-natgw-option-is-now-the-prod-default', async ({ page }) => {
test('default-outbound-option-to-be-load-balancer', async ({ page }) => {

await page.goto('http://localhost:3000/AKS-Construction');

Expand All @@ -14,15 +14,31 @@ test('managed-natgw-option-is-now-the-prod-default', async ({ page }) => {
//Check default value
const dropdown = await page.waitForSelector('[data-testid="net-aksEgressType"]')
await expect(dropdown).toBeVisible()
await expect(dropdown).toMatchText('Load Balancer')

});

test('managed-natgw-option-is-now-the-prod-default', async ({ page }) => {

await page.goto('http://localhost:3000/AKS-Construction');

// Click the 4th Tab in the portal Navigation Pivot (network)
await page.click('[data-testid="portalnav-Pivot"] > button:nth-child(4)');

//Change default value
const dropdown = await page.waitForSelector('[data-testid="net-aksEgressType"]')
await expect(dropdown).toBeVisible()
await expect(dropdown).toMatchText('NAT Gateway')

// Click the 1st Tab in the portal Navigation Pivot (network)
await page.click('[data-testid="portalnav-Pivot"] > button:nth-child(1)');

// //Check parameter is there
// Check parameter is absent
await page.waitForSelector('[data-testid="deploy-deploycmd"]')
const clitextbox = await page.$('[data-testid="deploy-deploycmd"]')
await expect(clitextbox).toBeVisible()
await expect(clitextbox).toContainText('aksOutboundTrafficType=natGateway')
await expect(clitextbox).not.toContainText('natGateway')

});

//TODO: Change value and check (this is a real pain with the DropDown control)
10 changes: 4 additions & 6 deletions helper/src/configpresets/principals.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@
"vnet_opt": "custom",
"vnetprivateend": false,
"afw": false,
"bastion": false
"bastion": false,
"aksOutboundTrafficType":"loadBalancer"
}
}
},
Expand Down Expand Up @@ -386,7 +387,8 @@
"vnet_opt": "custom",
"vnetprivateend": true,
"afw": true,
"bastion": true
"bastion": true,
"aksOutboundTrafficType": "userDefinedRouting"
}
}
}
Expand Down Expand Up @@ -426,8 +428,6 @@
"automationAccountScheduledStartStop": "Weekday"
},
"net": {
"createNatGateway": false,
"aksOutboundTrafficType": "loadBalancer"
}
}
},
Expand Down Expand Up @@ -462,8 +462,6 @@
"automationAccountScheduledStartStop": ""
},
"net": {
"createNatGateway": true,
"aksOutboundTrafficType": "natGateway"
}
}
}
Expand Down
Loading