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

Update testing guideline for updated testing policy #2131

Merged
merged 4 commits into from
Sep 13, 2023

Conversation

kevindiu
Copy link
Contributor

@kevindiu kevindiu commented Jul 13, 2023

Description:

This PR updates the testing policy with below changes:

  • Apply test coverage level C1 (branch coverage) on internal package
  • pkg testing strategy
    • Only test exported function
    • pkg/service test only interface function
    • pkg/config test read config file & the value is set
    • pkg/usecase test only New() with mocks
    • pkg/router & pkg/handler no test
    • pkg/handler basically no test other than testing bugfix
      • Detailed business logic tests should be written in e2e

Related Issue:

Versions:

  • Go Version: 1.20.6
  • Docker Version: 20.10.8
  • Kubernetes Version: v1.27.3
  • NGT Version: 2.0.16

Checklist:

Special notes for your reviewer:

Grammar checked by grammarly.

@sonatype-lift
Copy link

sonatype-lift bot commented Jul 13, 2023

Sonatype Lift is retiring

Sonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console.
We are extremely grateful and thank you for your support over the years.

📖 Read about the impacts and timeline

@kevindiu kevindiu requested review from a team, kpango and datelier and removed request for a team July 13, 2023 07:47
@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - replace the PR body by changelog details
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase main
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@cloudflare-pages
Copy link

cloudflare-pages bot commented Jul 13, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: da55038
Status: ✅  Deploy successful!
Preview URL: https://60065811.vald.pages.dev
Branch Preview URL: https://documentation-test-update-te.vald.pages.dev

View logs

@kevindiu kevindiu changed the title [Draft] Update testing guideline for updated testing policy Update testing guideline for updated testing policy Jul 14, 2023
@kevindiu kevindiu marked this pull request as ready for review July 14, 2023 02:59
kevindiu and others added 4 commits September 13, 2023 13:35
@vankichi vankichi force-pushed the documentation/test/update-testing-policy branch from e0c26b0 to da55038 Compare September 13, 2023 04:35
@kpango kpango merged commit 17b305c into main Sep 13, 2023
18 checks passed
@kpango kpango deleted the documentation/test/update-testing-policy branch September 13, 2023 07:50
@hlts2 hlts2 mentioned this pull request Sep 13, 2023
ykadowak added a commit that referenced this pull request Nov 30, 2023
ykadowak added a commit that referenced this pull request Nov 30, 2023
ykadowak added a commit that referenced this pull request Nov 30, 2023
ykadowak added a commit that referenced this pull request Nov 30, 2023
ykadowak added a commit that referenced this pull request Nov 30, 2023
ykadowak added a commit that referenced this pull request Nov 30, 2023
ykadowak added a commit that referenced this pull request Nov 30, 2023
ykadowak added a commit that referenced this pull request Nov 30, 2023
ykadowak added a commit that referenced this pull request Nov 30, 2023
kmrmt pushed a commit that referenced this pull request Dec 12, 2023
* update testing guideline for updated testing policy

Signed-off-by: kevindiu <kevin_diu@yahoo.com.hk>

* style: Format code with gofumpt and prettier

* fix grammar

Signed-off-by: kevindiu <kevin_diu@yahoo.com.hk>

* Update coding-style.md

---------

Signed-off-by: kevindiu <kevin_diu@yahoo.com.hk>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants