pulumi/sdk/go/common
bors[bot] f6d669c9e7
Merge #11524 #11586
11524: test: use T.TempDir to create temporary test directory r=Frassle a=Juneezee

# Description

A testing cleanup. 

This pull request replaces `ioutil.TempDir` with `t.TempDir`. We can use the `T.TempDir` function from the `testing` package to create temporary directory. The directory created by `T.TempDir` is automatically removed when the test and all its subtests complete. 

Reference: https://pkg.go.dev/testing#T.TempDir

```go
func TestFoo(t *testing.T) {
	// before
	tmpDir, err := ioutil.TempDir("", "")
	assert.NoError(t, err)
	defer os.RemoveAll(tmpDir)

	// now
	tmpDir := t.TempDir()
}
```

## Checklist

- [ ] ~~I have added tests that prove my fix is effective or that my feature works~~: Tests refactoring only, no new features added.
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [ ] ~~I have updated the [CHANGELOG-PENDING](https://github.com/pulumi/pulumi/blob/master/CHANGELOG_PENDING.md) file with my change~~: This PR is a non user-facing change.
<!--
If the change(s) in this PR is a modification of an existing call to the Pulumi Service,
then the service should honor older versions of the CLI where this change would not exist.
You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] ~~Yes, there are changes in this PR that warrants bumping the Pulumi Service API version~~: N/A
  <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. -->


11586: ci: Fix extraneous alpha draft releases r=AaronFriel a=AaronFriel

The [PR workflow to update Pulumi YAML to 1.0.4](https://github.com/pulumi/pulumi/actions/runs/3642973677) shows that it created a draft release, and this has been the case for all contributors' PRs.

This fixes the extra alpha releases created as a result of pull requests. The job "prepare-release" shouldn't run unless the ci/test label is set, indicating an intent to evaluate the full CI pipeline.


Co-authored-by: Eng Zer Jun <engzerjun@gmail.com>
Co-authored-by: Aaron Friel <mayreply@aaronfriel.com>
2022-12-08 17:57:51 +00:00
..
apitype Add prelim interface contract for Capabilities API 2022-11-10 13:08:27 +01:00
constant Send update metadata about update plans 2022-10-12 22:55:59 +01:00
diag [color] Use graphemes to measure strings. 2022-11-09 08:23:00 -08:00
display Moving previewDigest to sdk/go/common/display, and exporting it. (#9886) 2022-06-27 09:08:06 -05:00
encoding Consistently disable HTML escaping in JSON output (#10440) 2022-08-19 13:27:34 +01:00
resource Merge #11524 #11586 2022-12-08 17:57:51 +00:00
testing chore: Update doc comments, coding style, fix lint 2022-10-13 13:50:49 -07:00
tokens ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00
tools Toward replacing MSBuild with make+bash on Windows (#8617) 2022-01-07 22:27:14 -05:00
util Merge #11524 #11586 2022-12-08 17:57:51 +00:00
version move pkg/version -> sdk/go/common/version 2020-03-18 15:25:25 -07:00
workspace test: use T.TempDir to create temporary test directory 2022-12-03 15:17:08 +08:00