Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds framework based acctest for "mackerel_service" #227

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tosuke
Copy link
Contributor

@tosuke tosuke commented Jul 4, 2024

Output from acceptance testing:

$ make testacc TESTS='"TestAcc_MackerelService(Resource|DataSource)_"'
TF_ACC=1 go test -v ./mackerel/... ./internal/provider/... -run "TestAcc_MackerelService(Resource|DataSource)_" -timeout 120m
testing: warning: no tests to run
PASS
ok      github.com/mackerelio-labs/terraform-provider-mackerel/mackerel (cached) [no tests to run]
=== RUN   TestAcc_MackerelServiceDataSource_basic
=== PAUSE TestAcc_MackerelServiceDataSource_basic
=== RUN   TestAcc_MackerelServiceResource_basic
=== PAUSE TestAcc_MackerelServiceResource_basic
=== CONT  TestAcc_MackerelServiceDataSource_basic
=== CONT  TestAcc_MackerelServiceResource_basic
--- PASS: TestAcc_MackerelServiceDataSource_basic (4.37s)
--- PASS: TestAcc_MackerelServiceResource_basic (8.32s)
PASS
ok      github.com/mackerelio-labs/terraform-provider-mackerel/internal/provider  9.129s

@tosuke tosuke force-pushed the framework-service-test branch from 8117c4e to bf2fd50 Compare July 4, 2024 11:33
@tosuke tosuke force-pushed the framework-service-test branch from bf2fd50 to 7764926 Compare July 4, 2024 12:32
}`, name, memo)
}

func checkMackerelServiceDestroy(client *mackerel.Client) resource.TestCheckFunc {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

State checks are new feature and currently have no equivalence for CheckDestroy, so resource.TestCheckFunc is used.

@tosuke tosuke marked this pull request as ready for review July 4, 2024 12:38
@tosuke tosuke marked this pull request as draft July 24, 2024 11:19
@tosuke
Copy link
Contributor Author

tosuke commented Jul 24, 2024

do same thing on #229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant