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

test: using config file to run daemon test #2950

Closed
wants to merge 1 commit into from

Conversation

zhuangqh
Copy link
Contributor

background: some env may depend on some
specific config options.

Signed-off-by: zhuangqh zhuangqhc@gmail.com

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@zhuangqh zhuangqh requested a review from fuweid July 15, 2019 09:22
@codecov
Copy link

codecov bot commented Jul 15, 2019

Codecov Report

Merging #2950 into master will decrease coverage by 4.44%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2950      +/-   ##
==========================================
- Coverage   68.19%   63.75%   -4.45%     
==========================================
  Files         291      291              
  Lines       18351    18351              
==========================================
- Hits        12514    11699     -815     
- Misses       4382     5234     +852     
+ Partials     1455     1418      -37
Flag Coverage Δ
#criv1alpha2_test 34.8% <ø> (-0.02%) ⬇️
#integration_test_0 36.12% <ø> (ø) ⬆️
#integration_test_1 ?
#integration_test_2 ?
#integration_test_3 35.52% <ø> (-0.04%) ⬇️
#node_e2e_test 34.07% <ø> (-0.14%) ⬇️
#unittest 27.95% <ø> (ø) ⬆️
Impacted Files Coverage Δ
ctrd/image_commit.go 0% <0%> (-69.29%) ⬇️
daemon/mgr/container_commit.go 0% <0%> (-56.1%) ⬇️
storage/volume/modules/tmpfs/tmpfs.go 28.2% <0%> (-47.44%) ⬇️
daemon/events/filter.go 60% <0%> (-40%) ⬇️
apis/server/system_bridge.go 17.2% <0%> (-32.26%) ⬇️
apis/server/network_bridge.go 40.32% <0%> (-25.81%) ⬇️
pkg/exec/command.go 0% <0%> (-23.81%) ⬇️
apis/server/utils.go 53.84% <0%> (-21.16%) ⬇️
pkg/utils/mount.go 0% <0%> (-19.24%) ⬇️
daemon/mgr/container_copy.go 38.32% <0%> (-19.17%) ⬇️
... and 43 more

Copy link
Contributor

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@fuweid
Copy link
Contributor

fuweid commented Jul 17, 2019

@zhuangqh I trigger the CI to rerun it.

@fuweid
Copy link
Contributor

fuweid commented Jul 17, 2019

go test -c \
	-o bin/pouchd-integration-test github.com/alibaba/pouch/test
# github.com/alibaba/pouch/test [github.com/alibaba/pouch/test.test]
test/cli_logs_test.go:254:34: cannot use "--log-opt" (type string) as type map[string]interface {} in argument to StartDefaultDaemon
Makefile:215: recipe for target 'build-integration-test' failed
make: *** [build-integration-test] Error 2
The command "./travis_ci.sh integrationtest 4 0" exited with 2.

ping @zhuangqh

*background*: some env may depend on some
specific config options.

Signed-off-by: zhuangqh <zhuangqhc@gmail.com>
@fuweid
Copy link
Contributor

fuweid commented Oct 26, 2019

ping @zhuangqh any update?

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@rudyfly rudyfly requested a review from cxz66666 July 7, 2022 11:45
@@ -251,7 +251,9 @@ func (suite *PouchLogsSuite) TestSetLogPathInDaemon(c *check.C) {
logRootDir := "/tmp/TestSetLogsPathInDaemon"
defer os.RemoveAll(logRootDir)

dcfg, err := StartDefaultDaemon("--log-opt", fmt.Sprintf("root-dir=%s", logRootDir))
dcfg, err := StartDefaultDaemon(map[string]interface{}{
"--log-opt": fmt.Sprintf("root-dir=%s", logRootDir),
Copy link
Collaborator

Choose a reason for hiding this comment

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

This need use args instead of config field? Or use log-opt instead of --log-opt? I'm not sure 😢

@cxz66666
Copy link
Collaborator

Thank you for your contribution! because you don't response for a long time, I will close this PR and reopen #3036.

@cxz66666 cxz66666 closed this Jul 18, 2022
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.

5 participants