Skip to main content
Knowledge Base

Getting too many arguments in call to spdy.NewRoundTripperWithProxy error when i try to run my terratest go code which deploys, validates and un-deploys k8s pod to/from AWS EKS

Answer

**Problem :** Getting too many arguments in call to spdy.NewRoundTripperWithProxy error when i try to run my terratest go code which deploys, validates and un-deploys k8s pod to/from AWS EKS **Problem description** Hi All I am getting the error as mentioned in subject when i run my terratest go code. **Actually my scripts were perfectly working fine around 3 months back** but **looks like some library change happened** in between these 3 months in **k8s side which is affecting my scripts** Most problematic part is **i am unable to find out at which line number my script is failing** go mod init and go go mod tidy are working fine but as soon as i run go test command getting the error as attached in the screen shot <img width="960" alt="Issue" src="https://user-images.githubusercontent.com/73541850/170688549-0f2cc749-dc70-4a33-b9b0-a2f731affa75.png"> My code is present in drop box , here is the link https://www.dropbox.com/s/qre9zq8jqj9vfmf/ig_data_loader_test.go?dl=0 Please do the **needful as it is blocking me from running my automated tests** My go version `go version go1.17.8 linux/amd64` Below are the commands i used for deploying `go mod init <folder name under which .go script is present>` `go mod tidy -compat=1.17` `go test -v -timeout 120m` --- <ins datetime="2022-05-27T11:12:44Z"> <p><a href="https://support.gruntwork.io/hc/requests/108669">Tracked in ticket #108669</a></p> </ins>

The k8s library versions need to be in sync with Terratest. You can do the following to ensure they are in sync: 1. Remove your current `go.sum` 2. In your `go.mod`, make sure the following 3 k8s libraries are locked to the same version as terratest: https://github.com/gruntwork-io/terratest/blob/master/go.mod#L46-L48 3. Run `go mod tidy -compat=1.17` 4. Resolve any compile errors in your current code.