diff --git a/.github/workflows/gotest.yml b/.github/workflows/gotest.yml index 94dc298..0b9a784 100644 --- a/.github/workflows/gotest.yml +++ b/.github/workflows/gotest.yml @@ -3,10 +3,7 @@ name: Test -on: - push: - branches: - - "*" +on: pull_request jobs: diff --git a/internal/provider/appstoreapp_resource_test.go b/internal/provider/appstoreapp_resource_test.go index 64678ea..b846174 100644 --- a/internal/provider/appstoreapp_resource_test.go +++ b/internal/provider/appstoreapp_resource_test.go @@ -16,9 +16,12 @@ func TestAccAppStoreAppResource(t *testing.T) { { Config: providerConfig() + fmt.Sprintf(` resource "lumos_app" "test_app" { - name = "Terraform Testing - Appstore app" - description = "Terraform Testing Description" - category = "Developers" + name = "Terraform Testing - Appstore app" + description = "Terraform Testing Description" + category = "Developers" + website_url = "https://www.example.com" + logo_url = "https://www.example.com/logo.png" + request_instructions = "Custom request instructions" } resource "lumos_app_store_app" "test_app_store_app" { app_id = lumos_app.test_app.id diff --git a/internal/provider/appstoreappsettings_data_source_test.go b/internal/provider/appstoreappsettings_data_source_test.go index 888957e..3cc5b77 100644 --- a/internal/provider/appstoreappsettings_data_source_test.go +++ b/internal/provider/appstoreappsettings_data_source_test.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-testing/helper/resource" ) -func TestAccAppStoreAppSettingsResource(t *testing.T) { +func TestAccAppStoreAppSettingsDataSource(t *testing.T) { resource.Test(t, resource.TestCase{ ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, Steps: []resource.TestStep{ diff --git a/tests/client_test.go b/tests/client_test.go index 1236114..c90f27b 100644 --- a/tests/client_test.go +++ b/tests/client_test.go @@ -41,3 +41,15 @@ func TestGetApp(t *testing.T) { t.Fatalf(`client.AppStore.GetAppStoreApp(%s) = %v, %v`, appId, response, err) } } + +func TestCreateApp(t *testing.T) { + client, ctx := GetNewClient(t) + response, err := client.Core.CreateApp(ctx, shared.AppInputCreate{ + Name: "Terraform Testing - Create app", + Description: "Terraform Testing Description", + Category: "Developers", + }) + if err != nil || response == nil { + t.Fatalf(`client.Core.CreateApp() was unsuccessful, %v, %v`, response, err) + } +}