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

add some unit tests for yurt tunnel #470

Merged
merged 1 commit into from
Sep 16, 2021
Merged

Conversation

YRXING
Copy link
Member

@YRXING YRXING commented Sep 14, 2021

What type of PR is this?

/kind bug
/kind good-first-issue
/kind feature

What this PR does / why we need it:

improve the reliability of yurt-tunnel.

Which issue(s) this PR fixes:

Fixes #416

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

@openyurt-bot openyurt-bot added the size/XL size/XL: 500-999 label Sep 14, 2021
@openyurt-bot
Copy link
Collaborator

Welcome @YRXING! It looks like this is your first PR to openyurtio/openyurt 🎉

@rambohe-ch
Copy link
Member

@YRXING Please add the license header for new files. btw: fix the lint errors and unit-test failed cases.

@rambohe-ch
Copy link
Member

@YRXING please merge these six commits into one commit.

image

@rambohe-ch
Copy link
Member

@YRXING please fix the following errors.
image

@rambohe-ch
Copy link
Member

@YRXING please merge all commits into one commit.
image

@YRXING
Copy link
Member Author

YRXING commented Sep 16, 2021

@YRXING please fix the following errors.
image

I have format the project but golangci-lint still failed.

@rambohe-ch
Copy link
Member

@YRXING please fix the following errors.
image

I have format the project but golangci-lint still failed.

@YRXING On my local desktop, the golangci-lint errors as following:

helinbodeMacBook-Pro:openyurt helinbo$ golangci-lint run --out-format=github-actions --disable-all  -E deadcode -E gofmt -E goimports -E ineffassign -E misspell -E vet --timeout=15m
::error file=pkg/yurttunnel/dns/util.go,line=116::File is not `gofmt`-ed with `-s` (gofmt)
::error file=pkg/profile/profile_test.go,line=20::File is not `goimports`-ed (goimports)
::error file=pkg/yurttunnel/handlerwrapper/tracerequest/tracereq_test.go,line=20::File is not `goimports`-ed (goimports)
::error file=pkg/yurttunnel/dns/util_test.go,line=20::File is not `goimports`-ed (goimports)

@rambohe-ch
Copy link
Member

@YRXING please fix the following errors.
image

I have format the project but golangci-lint still failed.

@YRXING you need to install goimports command and reformat the above code files. and if you use goland to edit golang code, you can right click above files and select Go Tools --> Goimports File to format files.

@rambohe-ch
Copy link
Member

/lgtm
/approve

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rambohe-ch, YRXING

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

@openyurt-bot openyurt-bot added the approved approved label Sep 16, 2021
@openyurt-bot openyurt-bot merged commit 4196d1e into openyurtio:master Sep 16, 2021
@rambohe-ch
Copy link
Member

@YRXING Would you like to apply OpenYurt community member, and you can add me as sponsor. apply example is here: openyurtio/community#24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved lgtm lgtm size/XL size/XL: 500-999
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[yurt tunnel]welcome add unit testcases for yurt-tunnel components.
3 participants