You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, with Go1.20, I fail to run the tests on master.
For example,
$ go test -v -run '^TestRunYumUpdateWithSecurity$' ./ospatch/
=== RUN TestRunYumUpdateWithSecurity
yum.go:160: Unexpected call to *utilmocks.MockCommandRunner.Run([context.Background /usr/bin/yum check-update --assumeyes]) at /tmp/t/osconfig/packages/yum.go:160 because:
expected call at /tmp/t/osconfig/ospatch/yum_update_test.go:52 doesn't match the argument at index 1.
Got: /usr/bin/yum check-update --assumeyes (*exec.Cmd)
Want: is equal to /usr/bin/yum check-update --assumeyes (*exec.Cmd)
expected call at /tmp/t/osconfig/ospatch/yum_update_test.go:54 doesn't match the argument at index 1.
Got: /usr/bin/yum check-update --assumeyes (*exec.Cmd)
Want: is equal to /usr/bin/yum install --assumeyes foo (*exec.Cmd)
expected call at /tmp/t/osconfig/ospatch/yum_update_test.go:57 doesn't match the argument at index 1.
Got: /usr/bin/yum check-update --assumeyes (*exec.Cmd)
Want: is equal to /usr/bin/yum update --assumeno --cacheonly --color=never --security (*exec.Cmd)
controller.go:269: missing call(s) to *utilmocks.MockCommandRunner.Run(is equal to context.Background (*context.emptyCtx), is equal to /usr/bin/yum check-update --assumeyes (*exec.Cmd)) /tmp/t/osconfig/ospatch/yum_update_test.go:52
controller.go:269: missing call(s) to *utilmocks.MockCommandRunner.Run(is equal to context.Background (*context.emptyCtx), is equal to /usr/bin/yum install --assumeyes foo (*exec.Cmd)) /tmp/t/osconfig/ospatch/yum_update_test.go:54
controller.go:269: missing call(s) to *utilmocks.MockCommandRunner.Run(is equal to context.Background (*context.emptyCtx), is equal to /usr/bin/yum update --assumeno --cacheonly --color=never --security (*exec.Cmd)) /tmp/t/osconfig/ospatch/yum_update_test.go:57
controller.go:269: aborting test due to missing call(s)
--- FAIL: TestRunYumUpdateWithSecurity (0.01s)
FAIL
FAIL github.com/GoogleCloudPlatform/osconfig/ospatch 0.016s
FAIL
I think it's because Go1.20 adds a function to exec.Command struct, which is not comparable. golang/go@55eaae4
The text was updated successfully, but these errors were encountered:
zhsj
added a commit
to zhsj/osconfig
that referenced
this issue
Feb 8, 2023
Hi, with Go1.20, I fail to run the tests on master.
For example,
I think it's because Go1.20 adds a function to exec.Command struct, which is not comparable.
golang/go@55eaae4
The text was updated successfully, but these errors were encountered: