Skip to content

Commit

Permalink
Fix dependencies and broken unit test, add missing validation
Browse files Browse the repository at this point in the history
  • Loading branch information
manicminer committed May 19, 2021
1 parent 4cd4d74 commit b2de421
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 44 deletions.
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/hashicorp/terraform-provider-azuread/internal/clients"
"github.com/hashicorp/terraform-provider-azuread/internal/services/applications/parse"
applicationsValidate "github.com/hashicorp/terraform-provider-azuread/internal/services/applications/validate"
"github.com/hashicorp/terraform-provider-azuread/internal/tf"
"github.com/hashicorp/terraform-provider-azuread/internal/validate"
)
Expand Down Expand Up @@ -81,8 +82,9 @@ func applicationAppRoleResource() *schema.Resource {
},

"value": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
ValidateDiagFunc: applicationsValidate.RoleScopeClaimValue,
},
},
}
Expand Down
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/hashicorp/terraform-provider-azuread/internal/clients"
"github.com/hashicorp/terraform-provider-azuread/internal/services/applications/parse"
applicationsValidate "github.com/hashicorp/terraform-provider-azuread/internal/services/applications/validate"
"github.com/hashicorp/terraform-provider-azuread/internal/tf"
"github.com/hashicorp/terraform-provider-azuread/internal/validate"
)
Expand Down Expand Up @@ -101,7 +102,7 @@ func applicationOAuth2PermissionScopeResource() *schema.Resource {
"value": {
Type: schema.TypeString,
Required: true,
ValidateDiagFunc: validate.NoEmptyStrings,
ValidateDiagFunc: applicationsValidate.RoleScopeClaimValue,
},
},
}
Expand Down
4 changes: 2 additions & 2 deletions internal/services/applications/validate/tokens_test.go
Expand Up @@ -36,8 +36,8 @@ func TestRoleScopeClaimValue(t *testing.T) {
},
{
Value: "",
TestName: "Invalid_MinLength",
ErrCount: 1,
TestName: "Valid_Empty",
ErrCount: 0,
},
{
Value: acctest.RandString(121),
Expand Down
36 changes: 18 additions & 18 deletions vendor/github.com/dimchansky/utfbom/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 21 additions & 21 deletions vendor/github.com/mitchellh/copystructure/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b2de421

Please sign in to comment.