How to run unit tests?

I tried to run unit tests in my local host. but failed by the following error:

--- FAIL: TestRenewToken (1.35s)
mockserver.go:209: Registered handler for endpoints:
/v1/projects/-/serviceAccounts/service-1234567@gcp-sa-meshdataplane.iam.gserviceaccount.com:generateAccessToken
 /v1/token
setup.go:200: 2021-05-12 05:03:04.211270956 +0000 UTC m=+1.414034799 check if all servers in the STS flow are up and ready
setup.go:206: set up server address to dial 127.0.0.1:20023
setup.go:218: 2021-05-12 05:03:04.230754727 +0000 UTC m=+1.433518561 all servers in the STS flow are up and ready
setup.go:192: failed to start proxy: fork/exec /work/out/linux_amd64/envoy: no such file or directory
FAIL
FAIL	istio.io/istio/security/pkg/stsservice/test/renew_sts_token	1.518s
2021-05-12T05:03:05.3334164Z 2021-05-12T05:03:04.033520Z	info	port allocation status

Reproduce:
Checkout the master branch of Istio and make test

1 Like

Hi,

Have you tried running make docker first? Please see this guide for more details: