-
Notifications
You must be signed in to change notification settings - Fork 357
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
test: [M3-6620] - Add assertions for created LKE cluster in Cypress LKE tests #10593
Conversation
Coverage Report: ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let totalcpu = 0; | ||
let totalmemory = 0; | ||
let totalstorage = 0; | ||
let monthprice = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's camel case these to be consistent with how we typically handle variable names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! I will update them
if (clusterPlan.size == 2 && clusterPlan.type == 'Linode') { | ||
totalcpu = totalcpu + nodeCount * 1; | ||
totalmemory = totalmemory + nodeCount * 2; | ||
totalstorage = totalstorage + nodeCount * 50; | ||
monthprice = monthprice + nodeCount * 12; | ||
} | ||
if (clusterPlan.size == 4 && clusterPlan.type == 'Linode') { | ||
totalcpu = totalcpu + nodeCount * 2; | ||
totalmemory = totalmemory + nodeCount * 4; | ||
totalstorage = totalstorage + nodeCount * 80; | ||
monthprice = monthprice + nodeCount * 24; | ||
} | ||
if (clusterPlan.size == 4 && clusterPlan.type == 'Dedicated') { | ||
totalcpu = totalcpu + nodeCount * 2; | ||
totalmemory = totalmemory + nodeCount * 4; | ||
totalstorage = totalstorage + nodeCount * 80; | ||
monthprice = monthprice + nodeCount * 36; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On first glance I found these a bit unclear. The four variables are initialized to 0
and don't get modified anywhere else, right? Couldn't we just do, for example, totalStorage = nodeCount * 50
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the scenario when different linodes selected, the values can be calculated as a total. For example, when both clusterPlan.size == 2 && clusterPlan.type == 'Linode'
and clusterPlan.size == 4 && clusterPlan.type == 'Dedicated'
picked, the four variables need to be added based on the previous sum.
…KE tests (linode#10593) * Add assertions for lke tests * update comments * Added changeset: Add assertions for created LKE cluster in Cypress LKE tests * update after reviews
Description 📝
Assertions should be added to the LKE creation e2e test to confirm that the correct information is shown
Changes 🔄
How to test 🧪
As an Author I have considered 🤔
Check all that apply