Skip to content

Conversation

@lakshyaj02
Copy link

Added test case for ephemeral storage testing. Made changes in reading and converting memory from Bytes to GB.

Copy link
Collaborator

@enoodle enoodle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good over all,
Please run make validate && make test to make sure that all the check pass - I see that currently the linter fails.


for rName, rQuant := range r.scalarResources {
messageBuilder.WriteString(fmt.Sprintf(", %s: %v", rName, rQuant))
messageBuilder.WriteString(fmt.Sprintf(", %s: %v", rName, rQuant))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause the linter to file

Copy link
Collaborator

@enoodle enoodle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I have one final request

for rName, rQuant := range r.scalarResources {
messageBuilder.WriteString(fmt.Sprintf(", %s: %v", rName, rQuant))
if rName == v1.ResourceEphemeralStorage || rName == v1.ResourceStorage {
rQuant = rQuant / (1000 * 1000 * 1000) // convert from milli-bytes to GB
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rQuant = rQuant / (1000 * 1000 * 1000) // convert from milli-bytes to GB
rQuant = rQuant / (MemoryToGB) // convert from milli-bytes to GB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants