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
* First install `dep` dependency management tool for Go.
91
+
```sh
92
+
$ curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
93
+
```
94
+
* Change your working directory to the `test` folder.
95
+
* Run `dep`command to get required modules
96
+
```sh
97
+
$ dep ensure
98
+
```
99
+
100
+
#### Run test
101
+
102
+
Then simply run it in the local shell:
103
+
104
+
```sh
105
+
$ go test -v -timeout 15m yugabyte_test.go
106
+
```
107
+
* Note that go has a default test timeout of 10 minutes. With infrastructure testing, your tests will surpass the 10 minutes very easily. To extend the timeout, you can pass in the -timeout option, which takes a go duration string (e.g 10m for 10 minutes or 1h for 1 hour). In the above command, we use the -timeout option to override to a 90 minute timeout.
108
+
* When you hit the timeout, Go automatically exits the test, skipping all cleanup routines. This is problematic for infrastructure testing because it will skip your deferred infrastructure cleanup steps (i.e terraform destroy), leaving behind the infrastructure that was spun up. So it is important to use a longer timeout every time you run the tests.
0 commit comments