pulumi/tests/integration
bors[bot] 7efd298867
Merge #11829 #11833
11829: golangci-lint: Don't disable megacheck r=abhinav a=abhinav

As a pre-step to enabling staticcheck (#11808)
drop megacheck from the list of disabled linters.

This was suppressing the output of some other linters
that are enabled by default including gosimple and unused.

## Issues fixed

### pkg

```
cmd/pulumi/preview.go:199:4: S1011: should replace loop with `targetURNs = append(targetURNs, targets...)` (gosimple)
cmd/pulumi/preview.go:204:4: S1011: should replace loop with `replaceURNs = append(replaceURNs, replaces...)` (gosimple)
cmd/pulumi/refresh.go:248:4: S1011: should replace loop with `targetUrns = append(targetUrns, *targets...)` (gosimple)
cmd/pulumi/up.go:130:3: S1011: should replace loop with `targetURNs = append(targetURNs, targets...)` (gosimple)
cmd/pulumi/up.go:134:3: S1011: should replace loop with `replaceURNs = append(replaceURNs, replaces...)` (gosimple)
resource/stack/deployment.go:61:5: var `resourceSchema` is unused (unused)
codegen/hcl2/model/pretty/display.go:227:6: S1003: should use strings.ContainsRune(v, '\n') instead (gosimple)
codegen/hcl2/model/pretty/display.go:289:6: S1003: should use strings.ContainsRune(v, '\n') instead (gosimple)
codegen/nodejs/gen.go:110:2: S1029: should range over string, not []rune(string) (gosimple)
codegen/nodejs/gen_program.go:381:2: S1008: should use 'return makeValidIdentifier(outputName) != outputName' instead of 'if makeValidIdentifier(outputName) != outputName { return true }; return false' (gosimple)
codegen/go/gen_program_json.go:30:2: field `temps` is unused (unused)
codegen/go/gen_program_json.go:34:24: func `(*jsonSpiller).spillExpression` is unused (unused)
codegen/go/gen_program_json.go:12:6: type `jsonTemp` is unused (unused)
codegen/go/gen_program_expressions.go:542:21: func `(*generator).genRelativeTraversalExpression` is unused (unused)
codegen/go/gen_program_json.go:21:21: func `(*jsonTemp).Traverse` is unused (unused)
codegen/go/gen_program_json.go:31:2: field `count` is unused (unused)
codegen/go/gen_program.go:484:21: func `(*generator).getPkgContext` is unused (unused)
codegen/go/gen_program_json.go:17:21: func `(*jsonTemp).Type` is unused (unused)
codegen/go/gen_program_json.go:25:21: func `(*jsonTemp).SyntaxNode` is unused (unused)
codegen/go/gen_test.go:399:4: S1023: redundant break statement (gosimple)
codegen/python/gen_program.go:337:41: S1040: type assertion to the same type: destType already has type model.Type (gosimple)
backend/display/jsonmessage.go:176:27: func `(*messageRenderer).writeBlankLine` is unused (unused)
backend/display/progress.go:1239:21: S1012: should use `time.Since` instead of `time.Now().Sub` (gosimple)
codegen/hcl2/syntax/tokens.go:265:2: S1001: should use copy() instead of a loop (gosimple)
testing/integration/util.go:195:2: S1006: should use for {} instead of for true {} (gosimple)
testing/integration/program.go:456:3: S1011: should replace loop with `opts.OrderedConfig = append(opts.OrderedConfig, overrides.OrderedConfig...)` (gosimple)
testing/integration/program.go:690:3: S1038: should use t.Skipf(...) instead of t.Skip(fmt.Sprintf(...)) (gosimple)
codegen/dotnet/gen_program.go:255:21: func `(*generator).warnf` is unused (unused)
codegen/dotnet/gen.go:62:2: S1017: should replace this `if` statement with an unconditional `strings.TrimPrefix` (gosimple)
codegen/dotnet/gen_program.go:515:41: S1040: type assertion to the same type: destType already has type model.Type (gosimple)
codegen/schema/loader.go:116:9: S1039: unnecessary use of fmt.Sprintf (gosimple)
```

### sdk

```
python/cmd/pulumi-language-python/main.go:532:3: S1029: should range over string, not []rune(string) (gosimple)
go/common/resource/plugin/context.go:145:8: S1005: unnecessary assignment to the blank identifier (gosimple)
go/common/resource/plugin/context.go:144:3: S1000: should use a simple channel send/receive instead of `select` with a single case (gosimple)
go/common/util/env/env.go:198:9: S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple)
go/pulumi/resource_set.go:9:22: func `resourceSet.any` is unused (unused)
go/pulumi/resource_set.go:17:22: func `resourceSet.has` is unused (unused)
go/pulumi/resource_set.go:13:22: func `resourceSet.delete` is unused (unused)
go/pulumi/types_test.go:444:12: S1040: type assertion to the same type: argsV.R already has type Resource (gosimple)
go/auto/stack.go:153:2: S1021: should merge variable declaration with assignment on next line (gosimple)
go/auto/stack.go:170:2: S1021: should merge variable declaration with assignment on next line (gosimple)
go/common/resource/asset_test.go:391:6: func `findRepositoryRoot` is unused (unused)
go/common/util/goversion/version.go:32:2: S1017: should replace this `if` statement with an unconditional `strings.TrimPrefix` (gosimple)
```

### tests

There were a couple functions marked unused
that are used by tests that are currently skipped.
I've added `//nolint:unused` for those.


11833: crypto/ssh/terminal is deprecated r=abhinav a=abhinav

golang.org/x/crypto/ssh/terminal is deprecated.
golang.org/x/term is a near drop-in replacement for it.

In service to #11808


Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
2023-01-11 22:30:25 +00:00
..
about Remove dotnet 2022-12-13 16:13:53 +00:00
aliases feat(sdk/nodejs): delegates alias computation to the engine 2022-12-15 17:23:31 -05:00
cloud_secrets_provider Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
component_provider_schema ci: Simplify test listing, update go dependencies to 1.18 compat 2022-09-21 09:51:59 -07:00
config_basic Remove dotnet 2022-12-13 16:13:53 +00:00
config_capture_e2e/nodejs Changing build.proj to run all languages and tests on windows 2020-01-27 21:16:37 +02:00
config_secrets_warn Remove dotnet 2022-12-13 16:13:53 +00:00
construct_component Embed default gRPC server implementations 2023-01-05 17:54:11 -08:00
construct_component_error_apply Fix a hang in nodejs remote components when an error is thrown within an apply (#7365) 2021-06-25 18:41:54 -07:00
construct_component_methods Remove dotnet 2022-12-13 16:13:53 +00:00
construct_component_methods_errors Remove dotnet 2022-12-13 16:13:53 +00:00
construct_component_methods_resources Engine and Golang support for shimless providers 2022-11-14 11:25:41 +00:00
construct_component_methods_unknown Remove dotnet 2022-12-13 16:13:53 +00:00
construct_component_output_values Engine and Golang support for shimless providers 2022-11-14 11:25:41 +00:00
construct_component_plain Embed default gRPC server implementations 2023-01-05 17:54:11 -08:00
construct_component_provider Remove dotnet 2022-12-13 16:13:53 +00:00
construct_component_slow Remove dotnet 2022-12-13 16:13:53 +00:00
construct_component_unknown Embed default gRPC server implementations 2023-01-05 17:54:11 -08:00
construct_nested_component/go Update Go gRPC, require impl to embed UnimplementedXServer 2023-01-05 18:00:16 -08:00
custom_timeouts ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
delete_before_create ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
dependency_steps ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
double_pending_delete Do not execute pending deletes at the start of deployment 2022-10-14 15:52:13 +01:00
duplicate_urns ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
dynamic Lower the BrokenDynamicProvider regression test from integration to mock (#7951) 2021-09-10 17:25:48 -04:00
ee_perf Use prefered `new pulumi.Config()` form 2019-01-31 16:11:57 -08:00
empty Remove dotnet 2022-12-13 16:13:53 +00:00
enums Fix non-determinism in Python dynamic provider serialization (#9656) 2022-05-22 20:15:29 -07:00
exclude_protected Implement the --exclude-protected feature (#8359) 2021-11-15 11:45:14 -08:00
explicit_provider Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
gather_plugin Remove dotnet 2022-12-13 16:13:53 +00:00
get_created Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
get_resource Remove dotnet 2022-12-13 16:13:53 +00:00
go [yaml] Update Pulumi YAML to v0.5.8 2022-09-26 17:19:57 -07:00
invalid_package_json Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
large_resource Remove dotnet 2022-12-13 16:13:53 +00:00
nodejs chore: add new test case for esm-loading with a srcdir 2022-12-13 02:28:42 +00:00
partial_state ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
partial_values Propagate inputs to outputs during preview. (#3327) 2019-11-11 12:09:34 -08:00
policy unused: Remove unused functions and types 2023-01-11 11:17:54 -08:00
printf Remove dotnet 2022-12-13 16:13:53 +00:00
project_main Add a 'main' test for golang 2022-09-22 14:46:48 +01:00
project_main_abs Enable absolute and relative parent paths for pulumi main (#6734) 2021-04-08 21:39:52 -07:00
project_main_parent/foo Enable absolute and relative parent paths for pulumi main (#6734) 2021-04-08 21:39:52 -07:00
protect_resources ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
provider_secret_config Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
python fix: handle exception for main not found in python (#10617) 2022-09-07 08:42:38 -07:00
python_await [sdk/python] - Await all async tasks (#6606) 2021-03-30 10:56:17 -07:00
query ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
read ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
recreate_resource_check ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
refresh/go Fix regression validating project files with `refresh: always` set 2022-09-22 11:51:54 -07:00
resource_refs_get_resource Add tests to ensure `pulumi:pulumi:getResource` keeps resource refs 2022-12-16 15:38:46 -05:00
rotate_passphrase ci: Simplify test listing, update go dependencies to 1.18 compat 2022-09-21 09:51:59 -07:00
secret_outputs [sdk/python] Fix secret regression (#5496) 2020-10-01 14:57:51 -07:00
single_resource Suppress JSON outputs in preview correctly (#2771) 2019-05-25 12:10:38 +02:00
stack_bad_parenting Consistent dependencies (#2517) 2019-03-05 20:34:51 -08:00
stack_dependencies Remove existing lock files 2018-11-12 15:33:58 -08:00
stack_outputs Remove dotnet 2022-12-13 16:13:53 +00:00
stack_parenting Consistent dependencies (#2517) 2019-03-05 20:34:51 -08:00
stack_project_name Actually fix the naming test (#10554) 2022-08-31 20:52:23 +01:00
stack_reference Remove dotnet 2022-12-13 16:13:53 +00:00
stack_reference_multi/python Regression tests for StackReference in the Python SDK (#3913) 2020-02-17 10:40:46 -08:00
stack_reference_secrets/nodejs Remove dotnet 2022-12-13 16:13:53 +00:00
steps ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
targets ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
transformations Remove dotnet 2022-12-13 16:13:53 +00:00
tsconfig Add tsconfig option to specify tsconfig path (#8452) 2021-11-22 11:42:39 -08:00
types ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
unsafe_snapshot_tests/bad_resource Update tests/integration/unsafe_snapshot_tests/bad_resource/resource.ts 2022-09-15 08:00:36 -07:00
.gitignore ci: Enable async component builds 2022-09-14 10:06:05 -07:00
appdash_test.go Add trace proxying to fix sub-process trace collection into files (#7248) 2021-06-10 22:57:18 -04:00
component_setup.sh Engine and Golang support for shimless providers 2022-11-14 11:25:41 +00:00
integration_go_smoke_test.go ci: Move several tests out of smoke test jobs 2022-11-03 18:23:02 -07:00
integration_go_test.go Add tests to ensure `pulumi:pulumi:getResource` keeps resource refs 2022-12-16 15:38:46 -05:00
integration_nodejs_smoke_test.go ci: Move several tests out of smoke test jobs 2022-11-03 18:23:02 -07:00
integration_nodejs_test.go Fix spelling of passphrase 2023-01-03 15:48:49 +00:00
integration_python_smoke_test.go all: Drop ioutil 2023-01-06 16:35:14 -08:00
integration_python_test.go Add tests to ensure `pulumi:pulumi:getResource` keeps resource refs 2022-12-16 15:38:46 -05:00
integration_smoke_test.go ci: Move several tests out of smoke test jobs 2022-11-03 18:23:02 -07:00
integration_test.go Remove dotnet 2022-12-13 16:13:53 +00:00
integration_util_test.go grpc: WithInsecure is deprecated 2023-01-11 12:15:40 -08:00