-
Notifications
You must be signed in to change notification settings - Fork 950
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: add tests for label and config file in daemon #1087
Conversation
9a9a113
to
56e2f40
Compare
f3f2925
to
b853d2b
Compare
Codecov Report
@@ Coverage Diff @@
## master #1087 +/- ##
==========================================
+ Coverage 16.29% 16.47% +0.17%
==========================================
Files 161 161
Lines 8851 8870 +19
==========================================
+ Hits 1442 1461 +19
- Misses 7303 7306 +3
+ Partials 106 103 -3
|
test/daemon/daemon.go
Outdated
@@ -148,7 +152,17 @@ func (d *Config) StartDaemon() error { | |||
if util.WaitTimeout(time.Duration(d.timeout)*time.Second, d.IsDaemonUp) == false { | |||
if d.Debug == true { | |||
d.DumpLog() | |||
|
|||
fmt.Printf("\n") | |||
fmt.Printf("Failed to launch pouchd:%v\n", d.Args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we could use fmt.Printf("\nFailed to launch pouchd:%v\n", d.Args)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good
test/z_cli_daemon_test.go
Outdated
c.Assert(err, check.IsNil) | ||
|
||
// verify listen to tcp works | ||
command.PouchRun("--host", addr, "version").Assert(c, icmd.Success) | ||
|
||
dcfg.KillDaemon() | ||
defer dcfg.KillDaemon() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why KillDaemon() twice?
test/z_cli_daemon_test.go
Outdated
c.Assert(err, check.NotNil) | ||
} | ||
|
||
// TestDaemonConfigFileUnknownFlag tests start daemon with unknow flags in configure file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%s/unknow/unknown
fa51637
to
a13d235
Compare
Signed-off-by: letty <letty.ll@alibaba-inc.com>
@HusterWan code is ready, PTAL. |
LGTM |
Signed-off-by: letty letty.ll@alibaba-inc.com
Ⅰ. Describe what this PR did
Add deamon tests for :
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews