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

feat(authz): Add E2E test for kmeshctl authz functionality #1243

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ravjot07
Copy link
Contributor

  • Implement end-to-end test for kmeshctl authz commands (enable, status, disable)
  • Automatically retrieves a running Kmesh Daemon pod using kubectl
  • Verifies:
    • Enabling authz (kmeshctl authz enable <pod>)
    • Checking authz status (kmeshctl authz status <pod>)
    • Disabling authz (kmeshctl authz disable <pod>)
    • Ensuring correct output (true/enabled or false/disabled)
  • Adds retry mechanism to ensure pod readiness before executing tests

This enhances test coverage for Kmesh authz offloading and ensures functionality works on a live cluster.

Contributes towards: #991

@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign yaozengzeng for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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


// 2) Enable Authz on the Kmesh Daemon Pod
t.Run("enable-authz", func(t *testing.T) {
cmd := fmt.Sprintf("kmeshctl authz enable %s", podName)
Copy link
Member

Choose a reason for hiding this comment

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

You should install kmeshctl in e2e cluster first, refer to what I have done in another PR: test/e2e/run_test.sh of https://github.com/kmesh-net/kmesh/pull/641/files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okiee @YaoZengzeng i will take a look into this file and update this... really appreciate your guidance

@YaoZengzeng
Copy link
Member

Also make sure you pass the test case you have wrote, as well as the rest of the CI.

@ravjot07
Copy link
Contributor Author

Also make sure you pass the test case you have wrote, as well as the rest of the CI.

Yup, actually ci issues was with the previous pr it will be fixed once other pr got merged..

@ravjot07
Copy link
Contributor Author

Also make sure you pass the test case you have wrote, as well as the rest of the CI.

I will trying to get hold of this e2e testing and other stuff required for this project, could you guide me through some more resources it will really helpful for me to work with this e2e thing once I got more comfortable in this part

@YaoZengzeng
Copy link
Member

Also make sure you pass the test case you have wrote, as well as the rest of the CI.

I will trying to get hold of this e2e testing and other stuff required for this project, could you guide me through some more resources it will really helpful for me to work with this e2e thing once I got more comfortable in this part

#1210 (comment) These are all the resources now. If you are selected by LFX, you can help to further improve these.

Now you can ask questions directly under this PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants