Skip to content

Commit

Permalink
Revert irrelevant changes
Browse files Browse the repository at this point in the history
  • Loading branch information
VenelinMartinov committed Jan 13, 2025
1 parent 02a37be commit cf603be
Show file tree
Hide file tree
Showing 7 changed files with 1,100 additions and 10 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,18 @@ jobs:
cache-dependency-path: |
**/go.sum
# disable caching on windows because it's very slow
# see https://github.com/actions/setup-go/issues/495
cache: ${{ matrix.platform != 'windows-latest' }}
- name: export feature flags
run: echo ${{ matrix.feature-flags }}=true >> $GITHUB_ENV
if: ${{ matrix.platform != 'windows-latest' && matrix.feature-flags != 'DEFAULT' }}
- name: export feature flags
run: echo ${{ matrix.feature-flags }}=true >> $env:GITHUB_ENV
if: ${{ matrix.platform == 'windows-latest' && matrix.feature-flags != 'DEFAULT' }}
- name: Build
run: make build
- name: Build PF
run: cd pkg/pf && make build
- name: Shard tests
run: echo "SHARD_CMD=$(go run github.com/VenelinMartinov/sharder@9d09afeb1c053b4a0263fbaa5c3c9da1ca2d10e7 --total ${{ env.TOTAL_SHARDS }} --index ${{ matrix.shard }} --output testoutput.txt --format make)" >> $GITHUB_ENV
if: ${{ matrix.platform == 'ubuntu-latest' }}
- run: echo "$SHARD_CMD"
if: ${{ matrix.platform == 'ubuntu-latest' }}
- name: Test
run: make VERBOSE=true test_shard
if: ${{ matrix.platform == 'ubuntu-latest' }}
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ testing/coverage.txt
pf/coverage.out
pf/tests/coverage.out

pulumi-hcl-lint

schema-tpsdkv2.json
pulumi-hcl-lint
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ test:: install_plugins
PULUMI_TERRAFORM_BRIDGE_TEST_PROVIDER=$(shell pwd)/bin/pulumi-terraform-bridge-test-provider \
go test -count=1 -coverprofile="coverage.txt" -coverpkg=./... -timeout 2h -parallel ${TESTPARALLELISM} ./...

# Run a single shard of tests. This is a make target for use in CI. It assumes the shard arguments are provided in SHARD_CMD
test_shard:: install_plugins
@mkdir -p bin
go build -o bin ./internal/testing/pulumi-terraform-bridge-test-provider
PULUMI_TERRAFORM_BRIDGE_TEST_PROVIDER=$(shell pwd)/bin/pulumi-terraform-bridge-test-provider \
go test -count=1 -coverprofile="coverage.txt" -coverpkg=./... -timeout 2h -parallel ${TESTPARALLELISM} ./... ${SHARD_CMD}

# Run the tests and record profiling data. This is used for partitioning tests into shards for CI.
test_profile:: install_plugins
@mkdir -p bin
go build -o bin ./internal/testing/pulumi-terraform-bridge-test-provider
Expand Down
2 changes: 1 addition & 1 deletion pkg/pf/tests/provider_configure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ func TestConfigureBooleans(t *testing.T) {
}`)
}

func TestConfigureErrorReplacementPF(t *testing.T) {
func TestConfigureErrorReplacement(t *testing.T) {
t.Parallel()
t.Run("replace_config_properties", func(t *testing.T) {
errString := `some error with "config_property" and "config" but not config`
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfbridge/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1988,7 +1988,7 @@ func TestConfigure(t *testing.T) {
})
}

func TestConfigureErrorReplacementSDKv2(t *testing.T) {
func TestConfigureErrorReplacement(t *testing.T) {
t.Parallel()
t.Run("replace_config_properties", func(t *testing.T) {
p := testprovider.ProviderV2()
Expand Down
Loading

0 comments on commit cf603be

Please sign in to comment.