Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
elif [[ "$job" == "build" ]]; then
make build
elif [[ "$job" == "unit-test" ]]; then
make test
make unit-test
elif [[ "$job" == "integration-test" ]]; then
sudo apt-get update
sudo apt-get install -y stress-ng
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ tidy:
GO111MODULE=on go mod tidy
git diff -U --exit-code go.mod go.sum

test:
unit-test:
rm -rf cover.* cover
$(GOTEST) $$($(PACKAGE_LIST)) -coverprofile cover.out.tmp
cat cover.out.tmp | grep -v "_generated.deepcopy.go" > cover.out
Expand Down
2 changes: 2 additions & 0 deletions pkg/core/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ func NewDiskOption() *DiskOption {
CommonAttackConfig: CommonAttackConfig{
Kind: DiskAttack,
},
PayloadProcessNum: 1,
FillByFAllocate: true,
}
}

Expand Down
9 changes: 0 additions & 9 deletions pkg/core/disk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,4 @@ func Test_initPath(t *testing.T) {
}
_, err := initPath(&opt)
assert.Error(t, err)

opt = DiskOption{
CommonAttackConfig: CommonAttackConfig{
Action: DiskReadPayloadAction,
},
Path: "/",
}
_, err = initPath(&opt)
assert.NoError(t, err)
}
2 changes: 1 addition & 1 deletion pkg/core/jvm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func TestJVMCommand(t *testing.T) {
Pid: 1234,
Action: JVMStressAction,
},
"must set one of cpu-count and mem-size",
"must set one of cpu-count and mem-type",
},
{
&JVMCommand{
Expand Down
20 changes: 8 additions & 12 deletions pkg/utils/units_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ func TestSplitByteSize(t *testing.T) {
BlockSize: "1M",
Count: "0",
},
{
BlockSize: "",
Count: "",
},
},
wantErr: false,
},
Expand All @@ -109,8 +105,8 @@ func TestSplitByteSize(t *testing.T) {
BlockSize: "524288c",
Count: "1",
}, {
BlockSize: "1",
Count: "0c",
BlockSize: "1M",
Count: "0",
}},
wantErr: false,
}, {
Expand All @@ -126,8 +122,8 @@ func TestSplitByteSize(t *testing.T) {
BlockSize: "524288c",
Count: "1",
}, {
BlockSize: "1",
Count: "1c",
BlockSize: "1c",
Count: "1",
}},
wantErr: false,
}, {
Expand All @@ -143,8 +139,8 @@ func TestSplitByteSize(t *testing.T) {
BlockSize: "1M",
Count: "2",
}, {
BlockSize: "1",
Count: "1048576c",
BlockSize: "1048576c",
Count: "1",
}},
wantErr: false,
}, {
Expand All @@ -160,8 +156,8 @@ func TestSplitByteSize(t *testing.T) {
BlockSize: "1M",
Count: "2",
}, {
BlockSize: "1",
Count: "1048577c",
BlockSize: "1048577c",
Count: "1",
}},
wantErr: false,
},
Expand Down