Create Watchtower Project Resources (#1)

* Add watchtower provider using the auto generated go sdk.

* Add read and create for project resources.

* Add provider internal validate test.

* Update the project module to be terraform-provider-watchtower

* Organize the ResourceData to Project and vis versa logic into their own helper methods.

* Adding tests for going ResourceData to Project and vis versa.

* provider_update

* Single acceptance test written and correctly failing.

* Implement update and delete. Always run Acceptance Testing

* Move project field names into constants.

* Allow tests to use the apiError response for checking error code.

* Correcting the naming of key value consts.

* Rely on "make testacc" for acceptance testing instead of always running it.

* Updating dependencies to use the new TestController creation.
This commit is contained in:
Todd Knight authored and GitHub committed 2020-05-29 09:13:31 -07:00
1 parent a9af48caee
commit 5bb8c82819
9 files changed
+1870 -66

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
package provider
import (
"testing"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/terraform"
)
var testProvider *schema.Provider
var testProviders map[string]terraform.ResourceProvider
func init() {
testProvider = New().(*schema.Provider)
testProviders = map[string]terraform.ResourceProvider{
"watchtower": testProvider,
}
}
func TestProvider(t *testing.T) {
if err := New().(*schema.Provider).InternalValidate(); err != nil {
t.Fatalf("err: %s", err)
}
}