pulumi/pkg/codegen/go
Fraser Waters cf5b4a2790
Use `assert.NoError` rather than `assert.Nil` (#14233)
<!--- 
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
..
gen_program_test Use `assert.NoError` rather than `assert.Nil` (#14233) 2023-10-13 09:46:07 +00:00
doc.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
doc_test.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00
gen.go [go/sdk-gen] Generate output-versioned invokes for functions without inputs (#13694) 2023-10-02 12:53:06 +00:00
gen_crd2pulumi.go [go/sdk-gen] Generating SDK with generics (#13828) 2023-09-19 10:28:50 +00:00
gen_program.go Require Go 1.20 for Go Programgen (#13729) 2023-08-16 04:59:07 +00:00
gen_program_expression_test.go test(codegen/go): Fix broken TestLiteralExpression 2023-06-20 12:25:42 -07:00
gen_program_expressions.go Allow generating code for unknown invokes in non-strict mode 2023-07-10 15:05:18 +02:00
gen_program_json.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
gen_program_optionals.go [codegen/go] Improve optional params in invoke 2022-02-01 11:44:40 -08:00
gen_program_read_dir.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
gen_program_splat.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
gen_program_ternaries.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
gen_program_test.go programgen(go): Handle conflicting names in imported packages 2023-07-25 12:49:37 -07:00
gen_program_utils.go [programgen/dotnet,go] Implement singleOrNone intrinsic 2023-06-11 16:23:33 -07:00
gen_spill.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
gen_test.go Merge #13136 2023-07-07 21:33:39 +00:00
importer.go [go/sdk-gen] Generating SDK with generics (#13828) 2023-09-19 10:28:50 +00:00
test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
utilities.go pkg/codegen/go: Prefer contract.Assertf over contract.Assert 2023-02-13 16:27:39 -08:00
utilities_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00