mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-22 11:13:22 +00:00
virtiofs: fix error report in TestVirtiofsdStart when go test running
Initialize ctx with context.Background() instead of nil value. Fixes: #2718 Signed-off-by: zhanghj <zhanghj.lc@inspur.com>
This commit is contained in:
parent
279f8e9d03
commit
57e3712dbd
@ -70,7 +70,7 @@ func TestVirtiofsdStart(t *testing.T) {
|
||||
PID: tt.fields.PID,
|
||||
ctx: tt.fields.ctx,
|
||||
}
|
||||
var ctx context.Context
|
||||
ctx := context.Background()
|
||||
_, err := v.Start(ctx, nil)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("virtiofsd.Start() error = %v, wantErr %v", err, tt.wantErr)
|
||||
|
Loading…
Reference in New Issue
Block a user