doc: update wechat image

This commit is contained in:
jichangjun 2020-12-18 11:16:54 +08:00
parent adfacd1713
commit 5cbf6c47ad
3 changed files with 32 additions and 20 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 KiB

After

Width:  |  Height:  |  Size: 231 KiB

View File

@ -127,6 +127,18 @@ func TestClientAction(t *testing.T) {
param: ProfileParam{CoverFilePatterns: []string{"b.go$"}},
expected: "b/b.go",
},
{
name: "valid test with skipfile flag provided",
service: ServiceUnderTest{Name: "serviceOK", Address: profileSuccessMockSvr.URL},
param: ProfileParam{SkipFilePatterns: []string{"b.go$"}},
expected: "main.go",
},
{
name: "valid test with both skipfile and coverfile flags provided",
service: ServiceUnderTest{Name: "serviceOK", Address: profileSuccessMockSvr.URL},
param: ProfileParam{SkipFilePatterns: []string{"main.go"}, CoverFilePatterns: []string{".go$"}},
expected: "b.go",
},
}
for _, tc := range tcs {
t.Run(tc.name, func(t *testing.T) {

View File

@ -98,26 +98,6 @@ setup() {
kill -9 $SAMPLE_PID
}
@test "test goc profile with coverfile and skipfile flags" {
./simple-project 3>&- &
SAMPLE_PID=$!
sleep 2
wait_profile_backend "profile3" &
profile_pid=$!
run gocc profile --center=http://127.0.0.1:60001 --coverfile="a.go$,b.go$" --skipfile="b.go$" --debug --debugcisyncfile ci-sync.bak;
info $output
[ "$status" -eq 0 ]
[[ "$output" == *"mode: count"* ]]
[[ "$output" == *"a.go"* ]] # contains a.go file
[[ "$output" != *"b.go"* ]] # not contains b.go file
[[ "$output" != *"main.go"* ]] # not contains main.go file
wait $profile_pid
kill -9 $SAMPLE_PID
}
@test "test goc profile with service flag" {
./simple-project 3>&- &
SAMPLE_PID=$!
@ -148,6 +128,26 @@ setup() {
[ "$status" -eq 0 ]
[[ "$output" == *"mode: count"* ]]
wait $profile_pid
kill -9 $SAMPLE_PID
}
@test "test goc profile with coverfile and skipfile flags" {
./simple-project 3>&- &
SAMPLE_PID=$!
sleep 2
wait_profile_backend "profile6" &
profile_pid=$!
run gocc profile --center=http://127.0.0.1:60001 --coverfile="a.go$,b.go$" --skipfile="b.go$" --debug --debugcisyncfile ci-sync.bak;
info $output
[ "$status" -eq 0 ]
[[ "$output" == *"mode: count"* ]]
[[ "$output" == *"a.go"* ]] # contains a.go file
[[ "$output" != *"b.go"* ]] # not contains b.go file
[[ "$output" != *"main.go"* ]] # not contains main.go file
wait $profile_pid
kill -9 $SAMPLE_PID
}