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

Adding e2e test for update and delete of resourcequota #74570

Merged
merged 1 commit into from
Feb 27, 2019
Merged

Adding e2e test for update and delete of resourcequota #74570

merged 1 commit into from
Feb 27, 2019

Conversation

s-ito-ts
Copy link
Contributor

@s-ito-ts s-ito-ts commented Feb 26, 2019

What type of PR is this?
/kind feature

What this PR does / why we need it:
This patch adds e2e test for update and delete of resourcequota to cover the following API.

  • PUT /api/v1/namespaces/{namespace}/resourcequotas/{name}
  • DELETE /api/v1/namespaces/{namespace}/resourcequotas/{name}

Which issue(s) this PR fixes:

Fixes #74569

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 26, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @s-ito-ts. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 26, 2019
Expect(resourceQuotaResult.Spec.Hard[v1.ResourceCPU]).To(Equal(resource.MustParse("2")))
Expect(resourceQuotaResult.Spec.Hard[v1.ResourceMemory]).To(Equal(resource.MustParse("1Gi")))

By("Deleting a ResourceQuota")

Choose a reason for hiding this comment

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

@liggitt Hi, just a query that can we ensure the deleted resourceQuota like we are using for secrets, configmap etc. ? For example By("Ensuring resource quota status released usage")...

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand what this is asking

Copy link
Member

@oomichi oomichi left a comment

Choose a reason for hiding this comment

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

Most part is good for me, just one comment.


By("Deleting a ResourceQuota")
err = deleteResourceQuota(client, ns, quotaName)
Expect(err).NotTo(HaveOccurred())
Copy link
Member

Choose a reason for hiding this comment

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

I guess we can verify the ResourceQuota is deleted by adding the following:

By("Verifying the deleted ResourceQuota")
_, err := client.CoreV1().ResourceQuotas(ns).Get(quotaName, metav1.GetOptions{})
Expect(errors.IsNotFound(err)).To(Equal(true))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review.
I added it.

@oomichi
Copy link
Member

oomichi commented Feb 26, 2019

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 26, 2019
@oomichi
Copy link
Member

oomichi commented Feb 26, 2019

/cc @oomichi

@oomichi
Copy link
Member

oomichi commented Feb 27, 2019

Thanks for updating,

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 27, 2019
@liggitt
Copy link
Member

liggitt commented Feb 27, 2019

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, s-ito-ts

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 27, 2019
@k8s-ci-robot k8s-ci-robot merged commit 076af3d into kubernetes:master Feb 27, 2019
@liggitt liggitt added this to the v1.14 milestone Jun 10, 2019
@s-ito-ts s-ito-ts deleted the add_resourcequota_test branch August 29, 2019 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding e2e test for update and delete of resourcequota
5 participants