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 ebaf2ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit ebaf2ab

Please sign in to comment.