Commit Graph

6 Commits

Author SHA1 Message Date
Thomas Gummerer 6b8c85df9f enable thelper linter
Enable the thelper linter and add t.Helper() functions to the
beginning of each test helper function.  This makes the test output a
bit more easy to consume.
2024-02-05 20:28:51 +01:00
Fraser Waters cf5b4a2790
Use `assert.NoError` rather than `assert.Nil` ()
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->
Likewise `require.NoError` instead of `require.Nil`, and `assert.Error`
rather than `assert.NotNil`.

The error variants of these functions print the errors nicer for test
failures using `Error()` rather than `GoString()`.

For bail errors this is _much_ better than the `result.Result` days
where we now get errors like:
```
Error:      	Received unexpected error:
            	BAIL: inner error
```
instead of:
```
Error:      	Expected nil, but got: &simpleResult{}
```

Also print the bail error in `TestPlan.Run` so we can see the
description of it.
2023-10-13 09:46:07 +00:00
Abhinav Gupta 1ac8c17cdc
all: gofmt -w -s
Run `gofmt -w -s` on all files.

Command used to make this change:

    gofmt -w -s $(rg --files -g '*.go' | rg -v compilation_error)

Dropped `-s` for some generated files.

Depends on 
Resolves 
2023-01-10 19:03:24 -08:00
aq17 d3d8451bb4 Test transpiled examples for all languages 2022-11-01 11:23:14 -07:00
aq17 77b694e5fe Fix failing tests 2022-10-28 10:18:09 -07:00
Aaron Friel d2a8a140b7 chore: Update makefile, ensure make test_codegen_go 2022-10-17 00:22:48 -07:00