kmesh icon indicating copy to clipboard operation
kmesh copied to clipboard

Add Unit Tests for logs Package

Open ravjot07 opened this issue 10 months ago • 6 comments

  • Introduced logs_test.go to systematically validate core functions in logs.go.
  • Used httptest.NewServer to mock API responses for GetJson and SetLoggerLevel.
  • Captured os.Stdout to verify expected CLI outputs.

Contributes towards #991

ravjot07 avatar Feb 06 '25 20:02 ravjot07

[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 hzxuzhonghu 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

kmesh-bot avatar Feb 06 '25 20:02 kmesh-bot

@ravjot07 please fix CI, it seems to be an issue with kmeshctl doc, which should be fixed in #1217

Also sign off every commits to make DOC happy :)

YaoZengzeng avatar Feb 08 '25 01:02 YaoZengzeng

@ravjot07 please fix CI, it seems to be an issue with kmeshctl doc, which should be fixed in #1217

Also sign off every commits to make DOC happy :)

sure i will fix this

ravjot07 avatar Feb 09 '25 10:02 ravjot07

@ravjot07 please fix CI, it seems to be an issue with kmeshctl doc, which should be fixed in #1217

Also sign off every commits to make DOC happy :)

Hey, @YaoZengzeng, i am interested in eBPF unit test Project for LFX this term, can you guide me through process.. give me some resources so i can study this process... or provide some issue for me to work on so i can show my candidacy...

ravjot07 avatar Feb 09 '25 11:02 ravjot07

@ravjot07 please fix CI, it seems to be an issue with kmeshctl doc, which should be fixed in #1217 Also sign off every commits to make DOC happy :)

Hey, @YaoZengzeng, i am interested in eBPF unit test Project for LFX this term, can you guide me through process.. give me some resources so i can study this process... or provide some issue for me to work on so i can show my candidacy...

sorry, I'm responsible for e2e related lfx project, ref: https://github.com/kmesh-net/kmesh/issues/1210 .

If you're interested in eBPF unit test, you could ask @bitcoffeeiux ([email protected]) for help :)

YaoZengzeng avatar Feb 10 '25 02:02 YaoZengzeng

/assign

harshitghagre avatar Feb 11 '25 10:02 harshitghagre