Skip to content

feat: pkg/util/gitlab Enhancement (sub task of pkg/util Enhancement #833) - #869

Merged
xavier-hou merged 2 commits into
devstream-io:mainfrom
jxs1211:feat-pkg-util-gitlab
Jul 21, 2022
Merged

xavier-hou merged 2 commits into
devstream-io:mainfrom
jxs1211:feat-pkg-util-gitlab

Conversation

@jxs1211

@jxs1211 jxs1211 commented Jul 19, 2022

Copy link
Copy Markdown

Pre-Checklist

Note: please complete ALL items in the following checklist.

  • I have read through the CONTRIBUTING.md documentation.
  • My code has the necessary comments and documentation (if needed).
  • I have added relevant tests

Description

add ut for the package

Related Issues

see #833 for the details

New Behavior (screenshots if needed)

[going@dev gitlab]$ go tool cover -func=coverage.out
github.com/devstream-io/devstream/pkg/util/gitlab/ci_yml_templates.go:6:        GetGitLabCIGolangTemplate       75.0%
github.com/devstream-io/devstream/pkg/util/gitlab/commits.go:14:                CommitSingleFile                83.3%
github.com/devstream-io/devstream/pkg/util/gitlab/commits.go:35:                DeleteSingleFile                83.3%
github.com/devstream-io/devstream/pkg/util/gitlab/commits.go:55:                UpdateSingleFile                83.3%
github.com/devstream-io/devstream/pkg/util/gitlab/commits.go:76:                CommitMultipleFiles             90.0%
github.com/devstream-io/devstream/pkg/util/gitlab/gitlab.go:16:                 WithBaseURL                     100.0%
github.com/devstream-io/devstream/pkg/util/gitlab/gitlab.go:27:                 NewClient                       92.3%
github.com/devstream-io/devstream/pkg/util/gitlab/project.go:20:                CreateProject                   87.0%
github.com/devstream-io/devstream/pkg/util/gitlab/project.go:69:                DeleteProject                   75.0%
github.com/devstream-io/devstream/pkg/util/gitlab/project.go:78:                DescribeProject                 80.0%
github.com/devstream-io/devstream/pkg/util/gitlab/repository_files.go:12:       FileExists                      72.7%
total:                                                                          (statements)                    84.4%

@jxs1211
jxs1211 requested review from a team and IronCore864 as code owners July 19, 2022 12:46
@jxs1211
jxs1211 force-pushed the feat-pkg-util-gitlab branch 2 times, most recently from 7f6eb52 to 516ee0f Compare July 20, 2022 00:54
@xavier-hou xavier-hou self-assigned this Jul 20, 2022
@iyear

iyear commented Jul 20, 2022

Copy link
Copy Markdown
Member

Elegant unit tests! 🚀 I learned a lot about unit testing practices.

Comment thread pkg/util/gitlab/repository_files.go Outdated
Signed-off-by: xian-jie.shen <327411586@qq.com>
@jxs1211
jxs1211 force-pushed the feat-pkg-util-gitlab branch from 516ee0f to 10cfeff Compare July 21, 2022 04:24

@iyear iyear left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well Done! 🚀

Signed-off-by: hxcGit <houxc_mail@163.com>
@xavier-hou
xavier-hou merged commit 1adf10f into devstream-io:main Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants