Repository: qiniu/goc
Pull request #77 (2020-07-17 07:18:31)

Enhance "file lock sync" logic
1. add README about how to write e2e test case
2. enhance the "file lock sync" logic:
    1. as explained in the README, `wait_profile_backend` executed in the backend
    2. the forground test case **should wait**  `wait_profile_backend`  finish, or different test case's  `wait_profile_backend` may conflict 

qiniu-bot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/qiniu/goc/pull/77#" title="Author self-approved">lyyyuna</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=qiniu%2Fgoc).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/qiniu/goc/blob/master/OWNERS)~~ [lyyyuna]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **decrease** coverage by `9.86%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   68.58%   58.71%   -9.87%     
==========================================
  Files          33       32       -1     
  Lines        1687     1681       -6     
==========================================
- Hits         1157      987     -170     
- Misses        373      560     +187     
+ Partials      157      134      -23     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.71% <0.00%> (+0.08%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `77.04% <0.00%> (+3.20%)` | :arrow_up: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `0.00% <0.00%> (-71.43%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `14.70% <0.00%> (-64.71%)` | :arrow_down: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `11.11% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/cover.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2NvdmVyLmdv) | `44.44% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/version.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3ZlcnNpb24uZ28=) | `25.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/list.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2xpc3QuZ28=) | `33.33% <0.00%> (-44.45%)` | :arrow_down: |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <0.00%> (-44.00%)` | :arrow_down: |
| [cmd/register.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3JlZ2lzdGVyLmdv) | `46.66% <0.00%> (-40.00%)` | :arrow_down: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **decrease** coverage by `9.86%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   68.58%   58.71%   -9.87%     
==========================================
  Files          33       32       -1     
  Lines        1687     1681       -6     
==========================================
- Hits         1157      987     -170     
- Misses        373      560     +187     
+ Partials      157      134      -23     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.71% <0.00%> (+0.08%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `77.04% <0.00%> (+3.20%)` | :arrow_up: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `0.00% <0.00%> (-71.43%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `14.70% <0.00%> (-64.71%)` | :arrow_down: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `11.11% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/cover.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2NvdmVyLmdv) | `44.44% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/version.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3ZlcnNpb24uZ28=) | `25.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/list.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2xpc3QuZ28=) | `33.33% <0.00%> (-44.45%)` | :arrow_down: |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <0.00%> (-44.00%)` | :arrow_down: |
| [cmd/register.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3JlZ2lzdGVyLmdv) | `46.66% <0.00%> (-40.00%)` | :arrow_down: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **increase** coverage by `0.10%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
+ Coverage   68.58%   68.68%   +0.10%     
==========================================
  Files          33       33              
  Lines        1687     1683       -4     
==========================================
- Hits         1157     1156       -1     
+ Misses        373      370       -3     
  Partials      157      157              
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `41.29% <0.00%> (+0.09%)` | :arrow_up: |
| #unittest | `58.71% <0.00%> (+0.08%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `77.04% <0.00%> (+3.20%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **increase** coverage by `0.10%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
+ Coverage   68.58%   68.68%   +0.10%     
==========================================
  Files          33       33              
  Lines        1687     1683       -4     
==========================================
- Hits         1157     1156       -1     
+ Misses        373      370       -3     
  Partials      157      157              
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `41.29% <0.00%> (+0.09%)` | :arrow_up: |
| #unittest | `58.71% <0.00%> (+0.08%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `77.04% <0.00%> (+3.20%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **decrease** coverage by `9.86%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   68.58%   58.71%   -9.87%     
==========================================
  Files          33       32       -1     
  Lines        1687     1681       -6     
==========================================
- Hits         1157      987     -170     
- Misses        373      560     +187     
+ Partials      157      134      -23     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.71% <0.00%> (+0.08%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `77.04% <0.00%> (+3.20%)` | :arrow_up: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `0.00% <0.00%> (-71.43%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `14.70% <0.00%> (-64.71%)` | :arrow_down: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `11.11% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/cover.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2NvdmVyLmdv) | `44.44% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/version.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3ZlcnNpb24uZ28=) | `25.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/list.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2xpc3QuZ28=) | `33.33% <0.00%> (-44.45%)` | :arrow_down: |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <0.00%> (-44.00%)` | :arrow_down: |
| [cmd/register.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3JlZ2lzdGVyLmdv) | `46.66% <0.00%> (-40.00%)` | :arrow_down: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **decrease** coverage by `9.86%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   68.58%   58.71%   -9.87%     
==========================================
  Files          33       32       -1     
  Lines        1687     1681       -6     
==========================================
- Hits         1157      987     -170     
- Misses        373      560     +187     
+ Partials      157      134      -23     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.71% <0.00%> (+0.08%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `77.04% <0.00%> (+3.20%)` | :arrow_up: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `0.00% <0.00%> (-71.43%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `14.70% <0.00%> (-64.71%)` | :arrow_down: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `11.11% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/cover.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2NvdmVyLmdv) | `44.44% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/version.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3ZlcnNpb24uZ28=) | `25.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/list.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2xpc3QuZ28=) | `33.33% <0.00%> (-44.45%)` | :arrow_down: |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <0.00%> (-44.00%)` | :arrow_down: |
| [cmd/register.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3JlZ2lzdGVyLmdv) | `46.66% <0.00%> (-40.00%)` | :arrow_down: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **decrease** coverage by `0.43%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   68.58%   68.15%   -0.44%     
==========================================
  Files          33       33              
  Lines        1687     1683       -4     
==========================================
- Hits         1157     1147      -10     
- Misses        373      377       +4     
- Partials      157      159       +2     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `40.76% <0.00%> (-0.44%)` | :arrow_down: |
| #unittest | `58.71% <0.00%> (+0.08%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `80.32% <0.00%> (+6.48%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `73.57% <0.00%> (-5.00%)` | :arrow_down: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `76.84% <0.00%> (-4.22%)` | :arrow_down: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **decrease** coverage by `0.43%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   68.58%   68.15%   -0.44%     
==========================================
  Files          33       33              
  Lines        1687     1683       -4     
==========================================
- Hits         1157     1147      -10     
- Misses        373      377       +4     
- Partials      157      159       +2     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `40.76% <0.00%> (-0.44%)` | :arrow_down: |
| #unittest | `58.71% <0.00%> (+0.08%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `80.32% <0.00%> (+6.48%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `73.57% <0.00%> (-5.00%)` | :arrow_down: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `76.84% <0.00%> (-4.22%)` | :arrow_down: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **decrease** coverage by `9.86%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   68.58%   58.71%   -9.87%     
==========================================
  Files          33       32       -1     
  Lines        1687     1681       -6     
==========================================
- Hits         1157      987     -170     
- Misses        373      560     +187     
+ Partials      157      134      -23     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.71% <0.00%> (+0.08%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `77.04% <0.00%> (+3.20%)` | :arrow_up: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `0.00% <0.00%> (-71.43%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `14.70% <0.00%> (-64.71%)` | :arrow_down: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `11.11% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/cover.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2NvdmVyLmdv) | `44.44% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/version.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3ZlcnNpb24uZ28=) | `25.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/list.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2xpc3QuZ28=) | `33.33% <0.00%> (-44.45%)` | :arrow_down: |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <0.00%> (-44.00%)` | :arrow_down: |
| [cmd/register.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3JlZ2lzdGVyLmdv) | `46.66% <0.00%> (-40.00%)` | :arrow_down: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **decrease** coverage by `0.19%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   68.58%   68.38%   -0.20%     
==========================================
  Files          33       33              
  Lines        1687     1683       -4     
==========================================
- Hits         1157     1151       -6     
  Misses        373      373              
- Partials      157      159       +2     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `40.99% <0.00%> (-0.20%)` | :arrow_down: |
| #unittest | `58.71% <0.00%> (+0.08%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `80.32% <0.00%> (+6.48%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `76.84% <0.00%> (-4.22%)` | :arrow_down: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `76.42% <0.00%> (-2.15%)` | :arrow_down: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **decrease** coverage by `0.19%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   68.58%   68.38%   -0.20%     
==========================================
  Files          33       33              
  Lines        1687     1683       -4     
==========================================
- Hits         1157     1151       -6     
  Misses        373      373              
- Partials      157      159       +2     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `40.99% <0.00%> (-0.20%)` | :arrow_down: |
| #unittest | `58.71% <0.00%> (+0.08%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `80.32% <0.00%> (+6.48%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `76.84% <0.00%> (-4.22%)` | :arrow_down: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `76.42% <0.00%> (-2.15%)` | :arrow_down: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **decrease** coverage by `0.19%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   68.58%   68.38%   -0.20%     
==========================================
  Files          33       33              
  Lines        1687     1683       -4     
==========================================
- Hits         1157     1151       -6     
  Misses        373      373              
- Partials      157      159       +2     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `40.99% <0.00%> (-0.20%)` | :arrow_down: |
| #unittest | `58.71% <0.00%> (+0.08%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `80.32% <0.00%> (+6.48%)` | :arrow_up: |
| [pkg/cover/store.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3N0b3JlLmdv) | `76.84% <0.00%> (-4.22%)` | :arrow_down: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `76.42% <0.00%> (-2.15%)` | :arrow_down: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **decrease** coverage by `9.79%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   68.58%   58.78%   -9.80%     
==========================================
  Files          33       32       -1     
  Lines        1687     1684       -3     
==========================================
- Hits         1157      990     -167     
- Misses        373      560     +187     
+ Partials      157      134      -23     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.78% <0.00%> (+0.15%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `77.04% <0.00%> (+3.20%)` | :arrow_up: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `0.00% <0.00%> (-71.43%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `14.70% <0.00%> (-64.71%)` | :arrow_down: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `11.11% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/cover.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2NvdmVyLmdv) | `44.44% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/version.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3ZlcnNpb24uZ28=) | `25.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/list.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2xpc3QuZ28=) | `33.33% <0.00%> (-44.45%)` | :arrow_down: |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <0.00%> (-44.00%)` | :arrow_down: |
| [cmd/register.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3JlZ2lzdGVyLmdv) | `46.66% <0.00%> (-40.00%)` | :arrow_down: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **decrease** coverage by `9.79%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   68.58%   58.78%   -9.80%     
==========================================
  Files          33       32       -1     
  Lines        1687     1684       -3     
==========================================
- Hits         1157      990     -167     
- Misses        373      560     +187     
+ Partials      157      134      -23     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.78% <0.00%> (+0.15%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `77.04% <0.00%> (+3.20%)` | :arrow_up: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `0.00% <0.00%> (-71.43%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `14.70% <0.00%> (-64.71%)` | :arrow_down: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `11.11% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/cover.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2NvdmVyLmdv) | `44.44% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/version.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3ZlcnNpb24uZ28=) | `25.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/list.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL2xpc3QuZ28=) | `33.33% <0.00%> (-44.45%)` | :arrow_down: |
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <0.00%> (-44.00%)` | :arrow_down: |
| [cmd/register.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-Y21kL3JlZ2lzdGVyLmdv) | `46.66% <0.00%> (-40.00%)` | :arrow_down: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **increase** coverage by `0.51%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
+ Coverage   68.58%   69.09%   +0.51%     
==========================================
  Files          33       33              
  Lines        1687     1686       -1     
==========================================
+ Hits         1157     1165       +8     
+ Misses        373      367       -6     
+ Partials      157      154       -3     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `41.93% <0.00%> (+0.73%)` | :arrow_up: |
| #unittest | `58.78% <0.00%> (+0.15%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `80.32% <0.00%> (+6.48%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `79.02% <0.00%> (+0.44%)` | :arrow_up: |
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `75.43% <0.00%> (+0.70%)` | :arrow_up: |
| [pkg/build/tmpfolder.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3RtcGZvbGRlci5nbw==) | `71.27% <0.00%> (+2.12%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=h1) Report
> Merging [#77](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/a2a0880ff7f2be4e009fcfff894159c9c98bc2d3&el=desc) will **increase** coverage by `0.51%`.
> The diff coverage is `0.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/77/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
+ Coverage   68.58%   69.09%   +0.51%     
==========================================
  Files          33       33              
  Lines        1687     1686       -1     
==========================================
+ Hits         1157     1165       +8     
+ Misses        373      367       -6     
+ Partials      157      154       -3     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `41.93% <0.00%> (+0.73%)` | :arrow_up: |
| #unittest | `58.78% <0.00%> (+0.15%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/77?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/build/build.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2J1aWxkLmdv) | `80.32% <0.00%> (+6.48%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `79.02% <0.00%> (+0.44%)` | :arrow_up: |
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `75.43% <0.00%> (+0.70%)` | :arrow_up: |
| [pkg/build/tmpfolder.go](https://codecov.io/gh/qiniu/goc/pull/77/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3RtcGZvbGRlci5nbw==) | `71.27% <0.00%> (+2.12%)` | :arrow_up: |


Patch:
diff --git a/cmd/profile.go b/cmd/profile.go
index 4d9fa9d..1050928 100644
--- a/cmd/profile.go
+++ b/cmd/profile.go
@@ -38,10 +38,10 @@ goc profile
 # Get coverage counter from specified register center, the result output to specified file.
 goc profile --center=http://192.168.1.1:8080 --output=./coverage.cov
 
-# Get coverage counter of several specified services. You can get all available service names from command 'goc list'. Use 'service' and 'address' flag at the same time may cause ambiguity, please use them separately.
+# Get coverage counter of several specified services. You can get all available service names from command 'goc list'. Use 'service' and 'address' flag at the same time is illegal.
 goc profile --service=service1,service2,service3
 
-# Get coverage counter of several specified addresses. You can get all available addresses from command 'goc list'. Use 'service' and 'address' flag at the same time may cause ambiguity, please use them separately.
+# Get coverage counter of several specified addresses. You can get all available addresses from command 'goc list'. Use 'service' and 'address' flag at the same time is illegal.
 goc profile --address=address1,address2,address3
 
 # Force to get the coverage counter of all the available services you want.
@@ -81,8 +81,8 @@ var addrList []string
 
 func init() {
 	profileCmd.Flags().StringVarP(&output, "output", "o", "", "download cover profile")
-	profileCmd.Flags().StringSliceVarP(&svrList, "service", "", nil, "get the cover profile of these services, you can get all available service names from command `goc list`, use this flag and 'address' flag at the same time may cause ambiguity, please use them separately.")
-	profileCmd.Flags().StringSliceVarP(&addrList, "address", "", nil, "get the cover profile of these addresses, you can get all available addresses from command `goc list`, use this flag and 'service' flag at the same time may cause ambiguity, please use them separately.")
+	profileCmd.Flags().StringSliceVarP(&svrList, "service", "", nil, "get the cover profile of these services, you can get all available service names from command `goc list`, use this flag and 'address' flag at the same time is illegal.")
+	profileCmd.Flags().StringSliceVarP(&addrList, "address", "", nil, "get the cover profile of these addresses, you can get all available addresses from command `goc list`, use this flag and 'service' flag at the same time is illegal.")
 	profileCmd.Flags().BoolVarP(&force, "force", "f", false, "force to get the coverage counter of all the available services you want")
 	addBasicFlags(profileCmd.Flags())
 	rootCmd.AddCommand(profileCmd)
diff --git a/pkg/build/build.go b/pkg/build/build.go
index 48bae22..01ad30b 100644
--- a/pkg/build/build.go
+++ b/pkg/build/build.go
@@ -96,11 +96,9 @@ func (b *Build) Build() error {
 	log.Printf("go build cmd is: %v", cmd.Args)
 	err := cmd.Start()
 	if err != nil {
-		log.Errorf("Fail to execute: %v. The error is: %v", cmd.Args, err)
 		return fmt.Errorf("fail to execute: %v, err: %w", cmd.Args, err)
 	}
 	if err = cmd.Wait(); err != nil {
-		log.Errorf("go build failed. The error is: %v", err)
 		return fmt.Errorf("fail to execute: %v, err: %w", cmd.Args, err)
 	}
 	log.Infoln("Go build exit successful.")
@@ -111,7 +109,6 @@ func (b *Build) Build() error {
 // the binary name is always same as the directory name of current directory
 func (b *Build) determineOutputDir(outputDir string) (string, error) {
 	if b.TmpDir == "" {
-		log.Errorf("Can only be called after Build.MvProjectsToTmp(): %v", ErrWrongCallSequence)
 		return "", fmt.Errorf("can only be called after Build.MvProjectsToTmp(): %w", ErrWrongCallSequence)
 	}
 
@@ -119,8 +116,8 @@ func (b *Build) determineOutputDir(outputDir string) (string, error) {
 	if outputDir != "" {
 		abs, err := filepath.Abs(outputDir)
 		if err != nil {
-			log.Errorf("Fail to transform the path: %v to absolute path: %v", outputDir, err)
-			return "", err
+			return "", fmt.Errorf("Fail to transform the path: %v to absolute path: %v", outputDir, err)
+
 		}
 		return abs, nil
 	}
diff --git a/pkg/cover/client.go b/pkg/cover/client.go
index 7bdbb44..2c8f030 100644
--- a/pkg/cover/client.go
+++ b/pkg/cover/client.go
@@ -92,7 +92,7 @@ func (c *client) ListServices() ([]byte, error) {
 func (c *client) Profile(param ProfileParam) ([]byte, error) {
 	u := fmt.Sprintf("%s%s?force=%s", c.Host, CoverProfileAPI, strconv.FormatBool(param.Force))
 	if len(param.Service) != 0 && len(param.Address) != 0 {
-		return nil, fmt.Errorf("use 'service' flag and 'address' flag at the same time may cause ambiguity, please use them separately")
+		return nil, fmt.Errorf("use 'service' and 'address' flag at the same time is illegal")
 	}
 
 	for _, svr := range param.Service {
diff --git a/pkg/cover/server.go b/pkg/cover/server.go
index 3b36122..10da691 100644
--- a/pkg/cover/server.go
+++ b/pkg/cover/server.go
@@ -138,32 +138,35 @@ func profile(c *gin.Context) {
 		c.JSON(http.StatusExpectationFailed, gin.H{"error": "invalid param"})
 		return
 	}
-	serviceList := removeDuplicateElement(c.QueryArray("service"))
-	addressList := removeDuplicateElement(c.QueryArray("address"))
-	allInfos := DefaultStore.GetAll()
-	filterAddrList, err := filterAddrs(serviceList, addressList, force, allInfos)
+	svrList := c.QueryArray("service")
+	addrList := c.QueryArray("address")
+	svrsAll := DefaultStore.GetAll()
+	svrsUnderTest, err := getSvrUnderTest(svrList, addrList, force, svrsAll)
 	if err != nil {
 		c.JSON(http.StatusExpectationFailed, gin.H{"error": err.Error()})
-		return
 	}
 
 	var mergedProfiles = make([][]*cover.Profile, 0)
-	for _, addr := range filterAddrList {
-		pp, err := NewWorker(addr).Profile(ProfileParam{})
-		if err != nil {
-			if force {
-				log.Warnf("get profile from [%s] failed, error: %s", addr, err.Error())
-				continue
+	for _, svrs := range svrsUnderTest {
+		for _, addr := range svrs {
+			pp, err := NewWorker(addr).Profile(ProfileParam{})
+			if err != nil {
+				if force {
+					continue
+				}
+				c.JSON(http.StatusExpectationFailed, gin.H{"error": err.Error()})
+				return
 			}
-			c.JSON(http.StatusExpectationFailed, gin.H{"error": err.Error()})
-			return
-		}
-		profile, err := convertProfile(pp)
-		if err != nil {
-			c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
-			return
+			profile, err := convertProfile(pp)
+			if err != nil {
+				if force {
+					continue
+				}
+				c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
+				return
+			}
+			mergedProfiles = append(mergedProfiles, profile)
 		}
-		mergedProfiles = append(mergedProfiles, profile)
 	}
 
 	if len(mergedProfiles) == 0 {
@@ -232,53 +235,48 @@ func contains(arr []string, str string) bool {
 	return false
 }
 
-// filterAddrs filter address list by given service and address list
-func filterAddrs(serviceList, addressList []string, force bool, allInfos map[string][]string) (filterAddrList []string, err error) {
-	addressAll := []string{}
-	for _, addr := range allInfos {
-		addressAll = append(addressAll, addr...)
-	}
-	if len(serviceList) != 0 && len(addressList) != 0 {
-		return nil, fmt.Errorf("use 'service' flag and 'address' flag at the same time may cause ambiguity, please use them separately")
-	}
-	// Add matched services to map
-	for _, name := range serviceList {
-		if addr, ok := allInfos[name]; ok {
-			filterAddrList = append(filterAddrList, addr...)
-			continue // jump to match the next service
-		}
-		if !force {
-			return nil, fmt.Errorf("service [%s] not found", name)
-		}
-		log.Warnf("service [%s] not found", name)
-	}
-	// Add matched addresses to map
-	for _, addr := range addressList {
-		if contains(addressAll, addr) {
-			filterAddrList = append(filterAddrList, addr)
-			continue
-		}
-		if !force {
-			return nil, fmt.Errorf("address [%s] not found", addr)
-		}
-		log.Warnf("address [%s] not found", addr)
-	}
-	if len(addressList) == 0 && len(serviceList) == 0 {
-		filterAddrList = addressAll
+// getSvrUnderTest get service map by service and address list
+func getSvrUnderTest(svrList, addrList []string, force bool, svrsAll map[string][]string) (svrsUnderTest map[string][]string, err error) {
+	svrsUnderTest = map[string][]string{}
+	if len(svrList) != 0 && len(addrList) != 0 {
+		return nil, fmt.Errorf("use this flag and 'address' flag at the same time is illegal")
 	}
 	// Return all servers when all param is nil
-	return filterAddrList, nil
-}
-
-// removeDuplicateElement remove duplicate element in slice
-func removeDuplicateElement(addrs []string) []string {
-	result := make([]string, 0, len(addrs))
-	temp := map[string]struct{}{}
-	for _, item := range addrs {
-		if _, ok := temp[item]; !ok {
-			temp[item] = struct{}{}
-			result = append(result, item)
+	if len(svrList) == 0 && len(addrList) == 0 {
+		return svrsAll, nil
+	} else {
+		// Add matched services to map
+		if len(svrList) != 0 {
+			for _, name := range svrList {
+				if addr, ok := svrsAll[name]; ok {
+					svrsUnderTest[name] = addr
+					continue // jump to match the next service
+				}
+				if !force {
+					return nil, fmt.Errorf("service [%s] not found", name)
+				}
+			}
+		}
+		// Add matched addresses to map
+		if len(addrList) != 0 {
+		I:
+			for _, addr := range addrList {
+				for svr, addrs := range svrsAll {
+					if contains(svrsUnderTest[svr], addr) {
+						continue I // The address is duplicate, jump over
+					}
+					for _, a := range addrs {
+						if a == addr {
+							svrsUnderTest[svr] = append(svrsUnderTest[svr], a)
+							continue I // jump to match the next address
+						}
+					}
+				}
+				if !force {
+					return nil, fmt.Errorf("address [%s] not found", addr)
+				}
+			}
 		}
 	}
-	return result
+	return svrsUnderTest, nil
 }


Test patch:
diff --git a/pkg/cover/client_test.go b/pkg/cover/client_test.go
index 687eb1c..9bff493 100644
--- a/pkg/cover/client_test.go
+++ b/pkg/cover/client_test.go
@@ -68,7 +68,7 @@ func TestClientAction(t *testing.T) {
 		{
 			service: Service{Name: "serviceOK", Address: profileSuccessMockSvr.URL},
 			param:   ProfileParam{Force: false, Service: []string{"serviceOK"}, Address: []string{profileSuccessMockSvr.URL}},
-			res:     "use 'service' flag and 'address' flag at the same time may cause ambiguity, please use them separately",
+			res:     "use 'service' and 'address' flag at the same time is illegal",
 		},
 		{
 			service: Service{Name: "serviceOK", Address: profileSuccessMockSvr.URL},
@@ -94,6 +94,11 @@ func TestClientAction(t *testing.T) {
 			service: Service{Name: "serviceErr", Address: profileErrMockSvr.URL},
 			res:     "bad mode line: error",
 		},
+		{
+			service: Service{Name: "serviceErr", Address: profileErrMockSvr.URL},
+			param:   ProfileParam{Force: true},
+			res:     "no profiles",
+		},
 		{
 			service: Service{Name: "serviceNotExist", Address: "http://172.0.0.2:7777"},
 			res:     "connection refused",
diff --git a/pkg/cover/server_test.go b/pkg/cover/server_test.go
index 61f65ed..1e6d928 100644
--- a/pkg/cover/server_test.go
+++ b/pkg/cover/server_test.go
@@ -10,69 +10,51 @@ func TestContains(t *testing.T) {
 	assert.Equal(t, contains([]string{"a", "b"}, "c"), false)
 }
 
-func TestFilterAddrs(t *testing.T) {
+func TestGetSvrUnderTest(t *testing.T) {
 	svrAll := map[string][]string{
 		"service1": {"http://127.0.0.1:7777", "http://127.0.0.1:8888"},
 		"service2": {"http://127.0.0.1:9999"},
 	}
-	addrAll := []string{}
-	for _, addr := range svrAll {
-		addrAll = append(addrAll, addr...)
-	}
 	items := []struct {
 		svrList  []string
 		addrList []string
 		force    bool
 		err      string
-		addrRes  []string
+		svrRes   map[string][]string
 	}{
 		{
 			svrList:  []string{"service1"},
 			addrList: []string{"http://127.0.0.1:7777"},
-			err:      "use 'service' flag and 'address' flag at the same time may cause ambiguity, please use them separately",
+			err:      "use this flag and 'address' flag at the same time is illegal",
 		},
 		{
-			addrRes: addrAll,
+			svrRes: svrAll,
 		},
 		{
 			svrList: []string{"service1", "unknown"},
 			err:     "service [unknown] not found",
 		},
 		{
-			svrList: []string{"service1", "service2", "unknown"},
-			force:   true,
-			addrRes: addrAll,
-		},
-		{
-			svrList: []string{"unknown"},
+			svrList: []string{"service1", "service1", "service2", "unknown"},
 			force:   true,
+			svrRes:  svrAll,
 		},
 		{
 			addrList: []string{"http://127.0.0.1:7777", "http://127.0.0.2:7777"},
 			err:      "address [http://127.0.0.2:7777] not found",
 		},
 		{
-			addrList: []string{"http://127.0.0.1:7777", "http://127.0.0.1:9999", "http://127.0.0.2:7777"},
+			addrList: []string{"http://127.0.0.1:7777", "http://127.0.0.1:7777", "http://127.0.0.1:9999", "http://127.0.0.2:7777"},
 			force:    true,
-			addrRes:  []string{"http://127.0.0.1:7777", "http://127.0.0.1:9999"},
+			svrRes:   map[string][]string{"service1": {"http://127.0.0.1:7777"}, "service2": {"http://127.0.0.1:9999"}},
 		},
 	}
 	for _, item := range items {
-		addrs, err := filterAddrs(item.svrList, item.addrList, item.force, svrAll)
+		svrs, err := getSvrUnderTest(item.svrList, item.addrList, item.force, svrAll)
 		if err != nil {
 			assert.Equal(t, err.Error(), item.err)
 		} else {
-			if len(addrs) == 0 {
-				assert.Equal(t, addrs, item.addrRes)
-			}
-			for _, a := range addrs {
-				assert.Contains(t, item.addrRes, a)
-			}
+			assert.Equal(t, svrs, item.svrRes)
 		}
 	}
 }
-
-func TestRemoveDuplicateElement(t *testing.T) {
-	strArr := []string{"a", "a", "b"}
-	assert.Equal(t, removeDuplicateElement(strArr), []string{"a", "b"})
-}
diff --git a/tests/README.md b/tests/README.md
new file mode 100644
index 0000000..0bb93d4
--- /dev/null
+++ b/tests/README.md
@@ -0,0 +1,51 @@
+# How to write goc e2e test cases
+
+Current goc e2e test is based on the [bats-core](https://github.com/bats-core/bats-core) framework, you should read its document first.
+
+## Local dev requirements
+
+* [bats-core](https://github.com/bats-core/bats-core)
+* install `goc` to `PATH`
+* build `goc` with `goc`, generate the binary `gocc`, install `gocc` to `PATH`
+
+## Test goc
+
+First of all, you should start a `goc server` in `setup_file` function from the backend, 
+
+```
+setup_file() {
+    goc server 3>&- &
+    GOC_PID=$!
+    sleep 2
+    goc init
+}
+```
+
+According to [this](https://github.com/bats-core/bats-core/blob/master/README.md#file-descriptor-3-read-this-if-bats-hangs), you should turn off the file descriptor 3 for the long-running backend job. Then you can write any `goc` subcommand. Remember to kill the `$GOC_PID` in the `teardown_file` function.
+
+## Test covered goc - gocc
+
+We also need to test with the covered gocc in order to get coverage reports.
+
+Most gocc test cases share the same structure, here is the common flow diagram:
+
+```  
+  (1)                                       (2)                                     
+  (wait_profile_backend "xxx" &) --> wait ci-sync exist --> (goc profile -o filtered.cov)--
+                                            |                                             |
+                                            |                                             |
+                                            | (4)                                         |
+  --(gocc --debugcisyncfile ci-sync) --> finish, write ci-sync --> sleep 5; exit          |(5)
+  |                                                                        |              |
+  | (3)                                             (6)                    |              |
+  |------------------------>(goc server &) --------------------------------|              |
+                                  |                                                       |
+                                  ---------------------------------------------------------
+```
+
+1. start the `wait_profile_backend` in the background.
+2. `wait_profile_backend` will block until the file `ci-sync.bak` exists.
+3. the covered `gocc` subcommand start and register to the `goc server`.
+4. the covered `gocc` subcommand run its own logic until finish, as we add the `--debugcisyncfile ci-sync` flag, it will write a file called `ci-sync`, and wait 5 seconds.
+5. `wait_profile_backend` continue to run, and try to get the profile from the `goc server`.
+6. the `goc server` finally call the http API to get the `gocc` profile.
diff --git a/tests/build.bats b/tests/build.bats
index c9698ea..e2f17a0 100755
--- a/tests/build.bats
+++ b/tests/build.bats
@@ -29,18 +29,48 @@ teardown_file() {
     kill -9 $GOC_PID
 }
 
+setup() {
+    goc init
+}
+
 @test "test basic goc build command" {
     cd samples/run_for_several_seconds
-    wait_profile_backend "build1"
+    
+    wait_profile_backend "build1" &
+    profile_pid=$!
+
     run gocc build --debug --debugcisyncfile ci-sync.bak;
-    info build output: $output
+    info build1 output: $output
     [ "$status" -eq 0 ]
+
+    wait $profile_pid
 }
 
 @test "test goc build command without debug" {
     cd samples/run_for_several_seconds
-    wait_profile_backend "build2"
+
+    wait_profile_backend "build2" &
+    profile_pid=$!
+
     run gocc build --debugcisyncfile ci-sync.bak;
-    info build output: $output
+    info build2 output: $output
     [ "$status" -eq 0 ]
+
+    wait $profile_pid
+}
+
+@test "test goc build in GOPATH project" {
+    info $PWD
+    export GOPATH=$PWD/samples/simple_gopath_project
+    export GO111MODULE=off
+    cd samples/simple_gopath_project/src/qiniu.com/simple_gopath_project
+
+    wait_profile_backend "build3" &
+    profile_pid=$!
+
+    run gocc build --buildflags="-v" --debug --debugcisyncfile ci-sync.bak;
+    info build3 output: $output
+    [ "$status" -eq 0 ]
+
+    wait $profile_pid
 }
\ No newline at end of file
diff --git a/tests/clear.bats b/tests/clear.bats
index 453924c..24583c7 100755
--- a/tests/clear.bats
+++ b/tests/clear.bats
@@ -44,19 +44,25 @@ teardown_file() {
 }
 
 @test "test basic goc clear command" {
-    wait_profile_backend "clear1"
+    wait_profile_backend "clear1" &
+    profile_pid=$!
 
     run gocc clear --debug --debugcisyncfile ci-sync.bak;
     info clear1 output: $output
     [ "$status" -eq 0 ]
-    [[ "$output" == *"coverage counter clear call successfully"* ]]
+    [[ "$output" == *""* ]]
+
+    wait $profile_pid
 }
 
 @test "test clear another center" {
-    wait_profile_backend "clear2"
+    wait_profile_backend "clear2" &
+    profile_pid=$!
 
     run gocc clear --center=http://127.0.0.1:60001 --debug --debugcisyncfile ci-sync.bak;
     info clear2 output: $output
     [ "$status" -eq 0 ]
     [[ "$output" == *"coverage counter clear call successfully"* ]]
+
+    wait $profile_pid
 }
\ No newline at end of file
diff --git a/tests/cover.bats b/tests/cover.bats
index fce90e9..dc02751 100755
--- a/tests/cover.bats
+++ b/tests/cover.bats
@@ -35,9 +35,16 @@ teardown_file() {
     kill -9 $GOC_PID
 }
 
+setup() {
+    goc init
+}
+
 @test "test basic goc cover command" {
     cd test-temp
-    wait_profile_backend "cover1"
+
+    wait_profile_backend "cover1" &
+    profile_pid=$!
+
     run gocc cover --debug --debugcisyncfile ci-sync.bak;
     info cover1 output: $output
     [ "$status" -eq 0 ]
@@ -46,4 +53,6 @@ teardown_file() {
     info ls output: $output
     [ "$status" -eq 0 ]
     [[ "$output" == *"http_cover_apis_auto_generated.go"* ]]
+
+    wait $profile_pid
 }
diff --git a/tests/diff.bats b/tests/diff.bats
index dd96f15..fb8e653 100755
--- a/tests/diff.bats
+++ b/tests/diff.bats
@@ -29,41 +29,53 @@ teardown_file() {
     kill -9 $GOC_PID
 }
 
+setup() {
+    goc init
+}
+
 @test "test basic goc diff command" {
     cd samples/diff_samples
 
-    wait_profile_backend "diff1"
-
+    wait_profile_backend "diff1" &
+    profile_pid=$!
 
     run gocc diff --new-profile=./new.voc --base-profile=./base.voc --debug --debugcisyncfile ci-sync.bak;
-    info list output: $output
+    info diff1 output: $output
     [ "$status" -eq 0 ]
     [[ "$output" == *"qiniu.com/kodo/apiserver/server/main.go |     50.0%     |    100.0%    | 50.0%"* ]]
     [[ "$output" == *"Total                                   |     50.0%     |    100.0%    | 50.0%"* ]]
+
+    wait $profile_pid
 }
 
 @test "test diff in prow environment with periodic job" {
     cd samples/diff_samples
 
-    wait_profile_backend "diff2"
+    wait_profile_backend "diff2" &
+    profile_pid=$!
 
     export JOB_TYPE=periodic
 
     run gocc diff --new-profile=./new.voc --prow-postsubmit-job=base --debug --debugcisyncfile ci-sync.bak;
-    info diff1 output: $output
+    info diff2 output: $output
     [ "$status" -eq 0 ]
     [[ "$output" == *"do nothing"* ]]
+
+    wait $profile_pid
 }
 
 @test "test diff in prow environment with postsubmit job" {
     cd samples/diff_samples
 
-    wait_profile_backend "diff3"
+    wait_profile_backend "diff3" &
+    profile_pid=$!
 
     export JOB_TYPE=postsubmit
 
     run gocc diff --new-profile=./new.voc --prow-postsubmit-job=base --debug --debugcisyncfile ci-sync.bak;
-    info diff2 output: $output
+    info diff3 output: $output
     [ "$status" -eq 0 ]
     [[ "$output" == *"do nothing"* ]]
+
+    wait $profile_pid
 }
\ No newline at end of file
diff --git a/tests/init.bats b/tests/init.bats
index 68dc03b..0bb5d9d 100755
--- a/tests/init.bats
+++ b/tests/init.bats
@@ -44,9 +44,12 @@ teardown_file() {
 }
 
 @test "test init command" {
-    wait_profile_backend "init1"
+    wait_profile_backend "init1" &
+    profile_pid=$!
 
     run gocc init --center=http://127.0.0.1:60001 --debug --debugcisyncfile ci-sync.bak;
     info init output: $output
     [ "$status" -eq 0 ]
+
+    wait $profile_pid
 }
\ No newline at end of file
diff --git a/tests/install.bats b/tests/install.bats
index 3b4c321..dc4252d 100755
--- a/tests/install.bats
+++ b/tests/install.bats
@@ -29,13 +29,22 @@ teardown_file() {
     kill -9 $GOC_PID
 }
 
+setup() {
+    goc init
+}
+
 @test "test basic goc install command" {
     info $PWD
     export GOPATH=$PWD/samples/simple_gopath_project
     export GO111MODULE=off
     cd samples/simple_gopath_project/src/qiniu.com/simple_gopath_project
-    wait_profile_backend "install"
+
+    wait_profile_backend "install" &
+    profile_pid=$!
+
     run gocc install --debug --debugcisyncfile ci-sync.bak;
     info install output: $output
     [ "$status" -eq 0 ]
+
+    wait $profile_pid
 }
diff --git a/tests/list.bats b/tests/list.bats
index 76284fe..7e9c5da 100755
--- a/tests/list.bats
+++ b/tests/list.bats
@@ -36,11 +36,14 @@ teardown_file() {
 }
 
 @test "test basic goc list command" {
-    wait_profile_backend "list"
+    wait_profile_backend "list" &
+    profile_pid=$!
 
     run gocc list --debug --debugcisyncfile ci-sync.bak;
     info list output: $output
     [ "$status" -eq 0 ]
     [[ "$output" == *"gocc"* ]]
     [[ "$output" == *"http"* ]]
+
+    wait $profile_pid
 }
\ No newline at end of file
diff --git a/tests/profile.bats b/tests/profile.bats
index fa76a32..6dfbd30 100755
--- a/tests/profile.bats
+++ b/tests/profile.bats
@@ -27,6 +27,10 @@ setup_file() {
     GOCC_PID=$!
     sleep 1
 
+    WORKDIR=$PWD
+    cd samples/run_for_several_seconds
+    goc build --center=http://127.0.0.1:60001
+
     info "goc server started"
 }
 
@@ -35,19 +39,41 @@ teardown_file() {
     kill -9 $GOCC_PID
 }
 
+setup() {
+    goc init --center=http://127.0.0.1:60001
+    goc init
+}
+
 @test "test goc profile to stdout" {
-    wait_profile_backend "profile1"
+    ./simple-project 3>&- &
+    SAMPLE_PID=$!
+    sleep 2
 
-    run gocc profile --debug --debugcisyncfile ci-sync.bak;
+    wait_profile_backend "profile1" &
+    profile_pid=$!
+
+    run gocc profile --center=http://127.0.0.1:60001 --debug --debugcisyncfile ci-sync.bak
+    info $output
     [ "$status" -eq 0 ]
     [[ "$output" == *"mode: count"* ]]
+
+    wait $profile_pid
+    kill -9 $SAMPLE_PID
 }
 
 @test "test goc profile to file" {
-    wait_profile_backend "profile2"
+    ./simple-project 3>&- &
+    SAMPLE_PID=$!
+    sleep 2
 
-    run gocc profile -o test-profile.bak --debug --debugcisyncfile ci-sync.bak;
+    wait_profile_backend "profile2" &
+    profile_pid=$!
+
+    run gocc profile --center=http://127.0.0.1:60001 -o test-profile.bak --debug --debugcisyncfile ci-sync.bak;
     [ "$status" -eq 0 ]
     run cat test-profile.bak
     [[ "$output" == *"mode: count"* ]]
+
+    wait $profile_pid
+    kill -9 $SAMPLE_PID
 }
\ No newline at end of file
diff --git a/tests/register.bats b/tests/register.bats
index 058234c..6f5d089 100755
--- a/tests/register.bats
+++ b/tests/register.bats
@@ -35,20 +35,31 @@ teardown_file() {
     kill -9 $GOCC_PID
 }
 
+# we need to catch gocc server, so no init
+# setup() {
+#     goc init
+# }
+
 @test "test basic goc register command" {
-    wait_profile_backend "register1"
+    wait_profile_backend "register1" &
+    profile_pid=$!
 
     run gocc register --center=http://127.0.0.1:60001 --name=xyz --address=http://137.0.0.1:666 --debug --debugcisyncfile ci-sync.bak;
-    info register output: $output
+    info register1 output: $output
     [ "$status" -eq 0 ]
     [[ "$output" == *"success"* ]]
+
+    wait $profile_pid
 }
 
 @test "test goc register without port" {
-    wait_profile_backend "register2"
+    wait_profile_backend "register2" &
+    profile_pid=$!
 
     run gocc register --center=http://127.0.0.1:60001 --name=xyz --address=http://137.0.0.1 --debug --debugcisyncfile ci-sync.bak;
-    info register output: $output
+    info register2 output: $output
     [ "$status" -eq 0 ]
     [[ "$output" == *"missing port"* ]]
-}
\ No newline at end of file
+
+    wait $profile_pid
+}
diff --git a/tests/run.bats b/tests/run.bats
index 026a64f..81ba27e 100755
--- a/tests/run.bats
+++ b/tests/run.bats
@@ -34,10 +34,14 @@ teardown_file() {
     export GOPATH=$PWD/samples/simple_gopath_project
     export GO111MODULE=off
     cd samples/simple_gopath_project/src/qiniu.com/simple_gopath_project
-    wait_profile_backend "run1"
+
+    wait_profile_backend "run1" &
+    profile_pid=$!
 
     run gocc run . --debug --debugcisyncfile ci-sync.bak;
     info run output: $output
     [ "$status" -eq 0 ]
     [[ "$output" == *"hello, world."* ]]
+
+    wait $profile_pid
 }
\ No newline at end of file
diff --git a/tests/util.sh b/tests/util.sh
index d59d0d8..950c3b5 100644
--- a/tests/util.sh
+++ b/tests/util.sh
@@ -22,7 +22,8 @@ wait_profile() {
     local timeout=10
     until [[ ${n} -ge ${timeout} ]]
     do
-        # check whether the target port is listened by specific process
+        LS=`ls`
+        info $1, $LS
         if [[ -f ci-sync.bak ]]; then
             break
         fi
@@ -31,9 +32,10 @@ wait_profile() {
     done
     # collect from center
     goc profile -o filtered-$1.cov
+    info "done $1 collect"
 }
 
 wait_profile_backend() {
     rm ci-sync.bak || true
-    coproc { wait_profile $1; }
+    wait_profile $1
 }
\ No newline at end of file
diff --git a/tests/version.bats b/tests/version.bats
index 4323a2c..a4adfe2 100755
--- a/tests/version.bats
+++ b/tests/version.bats
@@ -35,8 +35,11 @@ teardown_file() {
 }
 
 @test "test basic goc version command" {
-    wait_profile_backend "version"
+    wait_profile_backend "version" &
+    profile_pid=$!
 
     run gocc version --debug --debugcisyncfile ci-sync.bak;
     [ "$output" = "(devel)" ]
+
+    wait $profile_pid
 }
\ No newline at end of file