nukosuke / terraform-provider-zendesk

Terraform Zendesk provider
https://registry.terraform.io/providers/nukosuke/zendesk/latest/docs
MIT License
26 stars 18 forks source link

Added automation resource #185

Closed RWejlgaard closed 4 years ago

RWejlgaard commented 4 years ago

This change corresponds to my pull request on go-zendesk

RWejlgaard commented 4 years ago

Builds are failing since automation support has not yet been merged in go-zendesk

nukosuke commented 4 years ago

@RWejlgaard

Hi, go-zendesk@v0.5.0 has been released 🎉

Now it's available on master branch(#161). Please rebase or merge master.

tamccall commented 4 years ago

Not sure what is going on, but when i try and run the tests locally i am getting the following errors.

± |feature/automation-resource ✓| → go test -v -cover -run TestAcc.* ./...
# github.com/nukosuke/terraform-provider-zendesk/zendesk
zendesk/resource_zendesk_automation.go:17:13: undefined: zendesk.AutomationAPI
zendesk/resource_zendesk_automation.go:21:13: undefined: zendesk.AutomationAPI
zendesk/resource_zendesk_automation.go:25:13: undefined: zendesk.AutomationAPI
zendesk/resource_zendesk_automation.go:29:13: undefined: zendesk.AutomationAPI
zendesk/resource_zendesk_automation.go:79:35: undefined: zendesk.Automation

Here is my branch info which looks correct to me.

 2019-11-29 15:09:27 ⌚  Andys-MacBook-Pro in ~/workspace/test/terraform-provider-zendesk
± |feature/automation-resource ✓| → gl
* b5686df - (HEAD -> feature/automation-resource, origin/feature/automation-resource) renamed 'trg' to 'automation' (9 hours ago) <Rasmus Wejlgaard>
* 275c433 - removed description field (7 days ago) <Rasmus Wejlgaard>
* 734d380 - implemented automations (7 days ago) <Rasmus Wejlgaard>
* daddb9e - (origin/terraform-v0.12) Fix the key to check if resource e
RWejlgaard commented 4 years ago

@tamccall Hi, have you pulled the latest go-zendesk? the dependent changes was recently merged

RWejlgaard commented 4 years ago

@tamccall I'm unable to reproduce your issue, can you try re running?

tamccall commented 4 years ago

@RWejlgaard sorry for being unresponsive. I have been on holiday. I was able to get the tests to run on this branch by updating the client to the latest version.

Currently seeing this failure when running the acceptance test.

=== RUN   TestAccAutomationExample
--- FAIL: TestAccAutomationExample (0.00s)
    testing.go:615: Step 0 error: 3 problems:

        - Argument or block definition required: On /var/folders/3n/2m9krr0j0gbcbw02v755nz240000gn/T/tf-test299730118/main.tf line 12: An argument or block definition is required here. To set an argument, use the equals sign "=" to introduce the argument value.
        - Argument or block definition required: On /var/folders/3n/2m9krr0j0gbcbw02v755nz240000gn/T/tf-test299730118/main.tf line 13: An argument or block definition is required here. To set an argument, use the equals sign "=" to introduce the argument value.
        - Argument or block definition required: On /var/folders/3n/2m9krr0j0gbcbw02v755nz240000gn/T/tf-test299730118/main.tf line 14: An argument or block definition is required here. To set an argument, use the equals sign "=" to introduce the argument value.

I am also seeing issues with the trigger automation tests. May need to update this branch with the latest master to make sure those are working correctly.

I know it is pretty hard to test these things without an api token. If you have your own zendesk access you can probably use that to run these tests against your own zendesk instance. If you don't have zendesk access there is a forum post on how to do that here. https://develop.zendesk.com/hc/en-us/articles/360000036968-Getting-a-trial-or-sponsored-account-for-development

In the meantime i've messaged @nukosuke to see if we can come up with a better solution for running the acceptance tests. If you want to participate in that discussion please join us on the repo's gitter!

tamccall commented 4 years ago

still seeing some errors

--- FAIL: TestAccAutomationExample (1.34s)
    testing.go:615: Step 0 error: Check failed: Check 1/4 error: Not found: zendesk_automation.auto-reply-automation in [root]