pulumi/sdk/go/common/resource
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
..
config Cleaning up a few pkg/errors uses 2022-11-02 14:20:44 +00:00
plugin Phase 3 of the convert mapper 2022-12-01 23:43:43 +00:00
testing Do not FailNow() in generators (#8469) 2021-11-19 20:39:11 -05:00
alias.go feat(engine): Adds structured alias support to the engine 2022-10-11 17:56:32 -04:00
alias_test.go feat(engine): Adds structured alias support to the engine 2022-10-11 17:56:32 -04:00
asset.go Cleaning up a few pkg/errors uses 2022-11-02 14:20:44 +00:00
asset_test.go test: use T.TempDir to create temporary test directory 2022-12-03 15:17:08 +08:00
custom_timeouts.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
errors.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
mapper_test.go Allow decoding *asset and *archive values 2022-10-17 13:28:13 -07:00
properties.go chore: Update doc comments, coding style, fix lint 2022-10-13 13:50:49 -07:00
properties_diff.go chore: Update doc comments, coding style, fix lint 2022-10-13 13:50:49 -07:00
properties_diff_test.go Specify fields on engine diff (#8488) 2021-11-30 12:25:27 -08:00
properties_path.go Cleaning up a few pkg/errors uses 2022-11-02 14:20:44 +00:00
properties_path_test.go Fix concurrent access to PropertyValue in TestPropertyPath (#9553) 2022-05-05 14:38:17 +01:00
properties_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
resource_goal.go Add DeletedWith resource option 2022-10-31 12:03:18 +02:00
resource_id.go Cleaning up a few pkg/errors uses 2022-11-02 14:20:44 +00:00
resource_id_test.go Add NewUniqueName (#9852) 2022-06-15 20:11:20 +01:00
resource_operation.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
resource_state.go Add DeletedWith resource option 2022-10-31 12:03:18 +02:00
stack.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
status.go move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00
urn.go ci: gofmt 1.18+ clean 2022-09-21 09:48:39 -07:00
urn_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00