Skip to content

Commit

Permalink
automation: updates to make tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte committed Jun 15, 2018
1 parent b4a6ebd commit df430d5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion azurerm/resource_arm_automation_credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func resourceArmAutomationCredentialCreateUpdate(d *schema.ResourceData, meta in

d.SetId(*read.ID)

return resourceArmAutomationAccountRead(d, meta)
return resourceArmAutomationCredentialRead(d, meta)
}

func resourceArmAutomationCredentialRead(d *schema.ResourceData, meta interface{}) error {
Expand Down
14 changes: 8 additions & 6 deletions azurerm/resource_arm_automation_credential_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ func TestAccAzureRMAutomationCredential_basic(t *testing.T) {
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"password"},
},
},
})
Expand All @@ -53,9 +54,10 @@ func TestAccAzureRMAutomationCredential_complete(t *testing.T) {
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"password"},
},
},
})
Expand Down
14 changes: 8 additions & 6 deletions azurerm/resource_arm_automation_runbook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ func TestAccAzureRMAutomationRunbook_PSWorkflow(t *testing.T) {
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"publish_content_link"},
},
},
})
Expand All @@ -52,9 +53,10 @@ func TestAccAzureRMAutomationRunbook_PSWorkflowWithHash(t *testing.T) {
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"publish_content_link"},
},
},
})
Expand Down
5 changes: 3 additions & 2 deletions azurerm/resource_arm_automation_schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
"strings"
"regexp"
)

func resourceArmAutomationSchedule() *schema.Resource {
Expand All @@ -31,10 +32,10 @@ func resourceArmAutomationSchedule() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
/*ValidateFunc: validation.StringMatch(
ValidateFunc: validation.StringMatch(
regexp.MustCompile(`^[^<>*%&:\\?.+/]{0,127}[^<>*%&:\\?.+/\s]$`),
`The name length must be from 1 to 128 characters. The name cannot contain special characters < > * % & : \ ? . + / and cannot end with a whitespace character.`,
),*/
),
},

"resource_group_name": resourceGroupNameSchema(),
Expand Down

0 comments on commit df430d5

Please sign in to comment.