doc: update wechat image
This commit is contained in:
parent
adfacd1713
commit
5cbf6c47ad
Binary file not shown.
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 231 KiB |
@ -127,6 +127,18 @@ func TestClientAction(t *testing.T) {
|
|||||||
param: ProfileParam{CoverFilePatterns: []string{"b.go$"}},
|
param: ProfileParam{CoverFilePatterns: []string{"b.go$"}},
|
||||||
expected: "b/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 {
|
for _, tc := range tcs {
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
t.Run(tc.name, func(t *testing.T) {
|
||||||
|
@ -98,26 +98,6 @@ setup() {
|
|||||||
kill -9 $SAMPLE_PID
|
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" {
|
@test "test goc profile with service flag" {
|
||||||
./simple-project 3>&- &
|
./simple-project 3>&- &
|
||||||
SAMPLE_PID=$!
|
SAMPLE_PID=$!
|
||||||
@ -148,6 +128,26 @@ setup() {
|
|||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"mode: count"* ]]
|
[[ "$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
|
wait $profile_pid
|
||||||
kill -9 $SAMPLE_PID
|
kill -9 $SAMPLE_PID
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user