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 c70a8bc
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 5 deletions.
47 changes: 47 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,61 @@ module github.com/hashicorp/terraform-provider-azuread
require (
github.com/Azure/azure-sdk-for-go v47.1.0+incompatible
github.com/Azure/go-autorest/autorest v0.11.10
github.com/Azure/go-autorest/autorest/adal v0.9.5
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2
github.com/Azure/go-autorest/autorest/date v0.3.0
github.com/Azure/go-autorest/autorest/to v0.4.0
github.com/Azure/go-autorest/autorest/validation v0.3.0
github.com/Azure/go-autorest/tracing v0.6.0
github.com/apparentlymart/go-cidr v1.0.1
github.com/apparentlymart/go-textseg/v13 v13.0.0
github.com/aws/aws-sdk-go v1.25.3
github.com/davecgh/go-spew v1.1.1
github.com/golang/protobuf v1.4.3
github.com/google/uuid v1.1.2
github.com/googleapis/gax-go/v2 v2.0.5
github.com/hashicorp/go-azure-helpers v0.13.1
github.com/hashicorp/go-checkpoint v0.5.0
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/go-getter v1.5.3
github.com/hashicorp/go-hclog v0.15.0
github.com/hashicorp/go-multierror v1.0.0
github.com/hashicorp/go-plugin v1.4.0
github.com/hashicorp/go-uuid v1.0.2
github.com/hashicorp/go-version v1.3.0
github.com/hashicorp/hcl/v2 v2.3.0
github.com/hashicorp/logutils v1.0.0
github.com/hashicorp/terraform-exec v0.13.3
github.com/hashicorp/terraform-json v0.10.0
github.com/hashicorp/terraform-plugin-go v0.3.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.6.1
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
github.com/klauspost/compress v1.11.2
github.com/manicminer/hamilton v0.13.0
github.com/mattn/go-colorable v0.1.4
github.com/mattn/go-isatty v0.0.10
github.com/mitchellh/copystructure v1.0.0
github.com/mitchellh/go-testing-interface v1.0.4
github.com/mitchellh/mapstructure v1.1.2
github.com/mitchellh/reflectwalk v1.0.1
github.com/sethvargo/go-password v0.2.0
github.com/vmihailenco/msgpack v4.0.4+incompatible
github.com/zclconf/go-cty v1.8.2
go.opencensus.io v0.22.4
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
golang.org/x/mod v0.3.0
golang.org/x/net v0.0.0-20210326060303-6b1517762897
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sys v0.0.0-20210324051608-47abb6519492
golang.org/x/text v0.3.5
golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
google.golang.org/api v0.29.0
google.golang.org/appengine v1.6.7
google.golang.org/genproto v0.0.0-20200711021454-869866162049
google.golang.org/grpc v1.32.0
google.golang.org/protobuf v1.25.0
)

go 1.16
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
47 changes: 47 additions & 0 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,37 @@ github.com/Azure/go-autorest
github.com/Azure/go-autorest/autorest
github.com/Azure/go-autorest/autorest/azure
# github.com/Azure/go-autorest/autorest/adal v0.9.5
## explicit
github.com/Azure/go-autorest/autorest/adal
# github.com/Azure/go-autorest/autorest/azure/cli v0.4.2
## explicit
github.com/Azure/go-autorest/autorest/azure/cli
# github.com/Azure/go-autorest/autorest/date v0.3.0
## explicit
github.com/Azure/go-autorest/autorest/date
# github.com/Azure/go-autorest/autorest/to v0.4.0
## explicit
github.com/Azure/go-autorest/autorest/to
# github.com/Azure/go-autorest/autorest/validation v0.3.0
## explicit
github.com/Azure/go-autorest/autorest/validation
# github.com/Azure/go-autorest/logger v0.2.0
github.com/Azure/go-autorest/logger
# github.com/Azure/go-autorest/tracing v0.6.0
## explicit
github.com/Azure/go-autorest/tracing
# github.com/agext/levenshtein v1.2.2
github.com/agext/levenshtein
# github.com/apparentlymart/go-cidr v1.0.1
## explicit
github.com/apparentlymart/go-cidr/cidr
# github.com/apparentlymart/go-textseg v1.0.0
github.com/apparentlymart/go-textseg/textseg
# github.com/apparentlymart/go-textseg/v13 v13.0.0
## explicit
github.com/apparentlymart/go-textseg/v13/textseg
# github.com/aws/aws-sdk-go v1.25.3
## explicit
github.com/aws/aws-sdk-go/aws
github.com/aws/aws-sdk-go/aws/awserr
github.com/aws/aws-sdk-go/aws/awsutil
Expand Down Expand Up @@ -82,6 +90,7 @@ github.com/aws/aws-sdk-go/service/sts/stsiface
# github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
github.com/bgentry/go-netrc/netrc
# github.com/davecgh/go-spew v1.1.1
## explicit
github.com/davecgh/go-spew/spew
# github.com/dimchansky/utfbom v1.1.0
github.com/dimchansky/utfbom
Expand All @@ -92,6 +101,7 @@ github.com/form3tech-oss/jwt-go
# github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
github.com/golang/groupcache/lru
# github.com/golang/protobuf v1.4.3
## explicit
github.com/golang/protobuf/internal/gengogrpc
github.com/golang/protobuf/proto
github.com/golang/protobuf/protoc-gen-go
Expand All @@ -105,6 +115,7 @@ github.com/golang/protobuf/ptypes/timestamp
## explicit
github.com/google/uuid
# github.com/googleapis/gax-go/v2 v2.0.5
## explicit
github.com/googleapis/gax-go/v2
# github.com/hashicorp/errwrap v1.0.0
github.com/hashicorp/errwrap
Expand All @@ -114,8 +125,10 @@ github.com/hashicorp/go-azure-helpers/authentication
github.com/hashicorp/go-azure-helpers/response
github.com/hashicorp/go-azure-helpers/sender
# github.com/hashicorp/go-checkpoint v0.5.0
## explicit
github.com/hashicorp/go-checkpoint
# github.com/hashicorp/go-cleanhttp v0.5.2
## explicit
github.com/hashicorp/go-cleanhttp
# github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
## explicit
Expand All @@ -126,13 +139,17 @@ github.com/hashicorp/go-cty/cty/json
github.com/hashicorp/go-cty/cty/msgpack
github.com/hashicorp/go-cty/cty/set
# github.com/hashicorp/go-getter v1.5.3
## explicit
github.com/hashicorp/go-getter
github.com/hashicorp/go-getter/helper/url
# github.com/hashicorp/go-hclog v0.15.0
## explicit
github.com/hashicorp/go-hclog
# github.com/hashicorp/go-multierror v1.0.0
## explicit
github.com/hashicorp/go-multierror
# github.com/hashicorp/go-plugin v1.4.0
## explicit
github.com/hashicorp/go-plugin
github.com/hashicorp/go-plugin/internal/plugin
# github.com/hashicorp/go-safetemp v1.0.0
Expand All @@ -141,20 +158,26 @@ github.com/hashicorp/go-safetemp
## explicit
github.com/hashicorp/go-uuid
# github.com/hashicorp/go-version v1.3.0
## explicit
github.com/hashicorp/go-version
# github.com/hashicorp/hcl/v2 v2.3.0
## explicit
github.com/hashicorp/hcl/v2
github.com/hashicorp/hcl/v2/ext/customdecode
github.com/hashicorp/hcl/v2/hclsyntax
# github.com/hashicorp/logutils v1.0.0
## explicit
github.com/hashicorp/logutils
# github.com/hashicorp/terraform-exec v0.13.3
## explicit
github.com/hashicorp/terraform-exec/internal/version
github.com/hashicorp/terraform-exec/tfexec
github.com/hashicorp/terraform-exec/tfinstall
# github.com/hashicorp/terraform-json v0.10.0
## explicit
github.com/hashicorp/terraform-json
# github.com/hashicorp/terraform-plugin-go v0.3.0
## explicit
github.com/hashicorp/terraform-plugin-go/tfprotov5
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5
Expand Down Expand Up @@ -184,12 +207,14 @@ github.com/hashicorp/terraform-plugin-sdk/v2/terraform
# github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d
github.com/hashicorp/yamux
# github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
## explicit
github.com/jmespath/go-jmespath
# github.com/jstemmer/go-junit-report v0.9.1
github.com/jstemmer/go-junit-report
github.com/jstemmer/go-junit-report/formatter
github.com/jstemmer/go-junit-report/parser
# github.com/klauspost/compress v1.11.2
## explicit
github.com/klauspost/compress/fse
github.com/klauspost/compress/huff0
github.com/klauspost/compress/snappy
Expand All @@ -204,20 +229,26 @@ github.com/manicminer/hamilton/internal/utils
github.com/manicminer/hamilton/msgraph
github.com/manicminer/hamilton/odata
# github.com/mattn/go-colorable v0.1.4
## explicit
github.com/mattn/go-colorable
# github.com/mattn/go-isatty v0.0.10
## explicit
github.com/mattn/go-isatty
# github.com/mitchellh/copystructure v1.0.0
## explicit
github.com/mitchellh/copystructure
# github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/go-homedir
# github.com/mitchellh/go-testing-interface v1.0.4
## explicit
github.com/mitchellh/go-testing-interface
# github.com/mitchellh/go-wordwrap v1.0.0
github.com/mitchellh/go-wordwrap
# github.com/mitchellh/mapstructure v1.1.2
## explicit
github.com/mitchellh/mapstructure
# github.com/mitchellh/reflectwalk v1.0.1
## explicit
github.com/mitchellh/reflectwalk
# github.com/oklog/run v1.0.0
github.com/oklog/run
Expand All @@ -230,9 +261,11 @@ github.com/ulikunitz/xz/internal/hash
github.com/ulikunitz/xz/internal/xlog
github.com/ulikunitz/xz/lzma
# github.com/vmihailenco/msgpack v4.0.4+incompatible
## explicit
github.com/vmihailenco/msgpack
github.com/vmihailenco/msgpack/codes
# github.com/zclconf/go-cty v1.8.2
## explicit
github.com/zclconf/go-cty/cty
github.com/zclconf/go-cty/cty/convert
github.com/zclconf/go-cty/cty/function
Expand All @@ -241,6 +274,7 @@ github.com/zclconf/go-cty/cty/gocty
github.com/zclconf/go-cty/cty/json
github.com/zclconf/go-cty/cty/set
# go.opencensus.io v0.22.4
## explicit
go.opencensus.io
go.opencensus.io/internal
go.opencensus.io/internal/tagencoding
Expand All @@ -258,6 +292,7 @@ go.opencensus.io/trace/internal
go.opencensus.io/trace/propagation
go.opencensus.io/trace/tracestate
# golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
## explicit
golang.org/x/crypto/blowfish
golang.org/x/crypto/cast5
golang.org/x/crypto/chacha20
Expand All @@ -280,9 +315,11 @@ golang.org/x/crypto/ssh/internal/bcrypt_pbkdf
golang.org/x/lint
golang.org/x/lint/golint
# golang.org/x/mod v0.3.0
## explicit
golang.org/x/mod/module
golang.org/x/mod/semver
# golang.org/x/net v0.0.0-20210326060303-6b1517762897
## explicit
golang.org/x/net/context
golang.org/x/net/context/ctxhttp
golang.org/x/net/http/httpguts
Expand All @@ -292,21 +329,25 @@ golang.org/x/net/idna
golang.org/x/net/internal/timeseries
golang.org/x/net/trace
# golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
## explicit
golang.org/x/oauth2
golang.org/x/oauth2/google
golang.org/x/oauth2/internal
golang.org/x/oauth2/jws
golang.org/x/oauth2/jwt
# golang.org/x/sys v0.0.0-20210324051608-47abb6519492
## explicit
golang.org/x/sys/cpu
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix
# golang.org/x/text v0.3.5
## explicit
golang.org/x/text/secure/bidirule
golang.org/x/text/transform
golang.org/x/text/unicode/bidi
golang.org/x/text/unicode/norm
# golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed
## explicit
golang.org/x/tools/cmd/goimports
golang.org/x/tools/go/ast/astutil
golang.org/x/tools/go/gcexportdata
Expand All @@ -320,9 +361,11 @@ golang.org/x/tools/internal/gocommand
golang.org/x/tools/internal/gopathwalk
golang.org/x/tools/internal/imports
# golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
## explicit
golang.org/x/xerrors
golang.org/x/xerrors/internal
# google.golang.org/api v0.29.0
## explicit
google.golang.org/api/googleapi
google.golang.org/api/googleapi/transport
google.golang.org/api/internal
Expand All @@ -336,6 +379,7 @@ google.golang.org/api/transport/cert
google.golang.org/api/transport/http
google.golang.org/api/transport/http/internal/propagation
# google.golang.org/appengine v1.6.7
## explicit
google.golang.org/appengine
google.golang.org/appengine/datastore
google.golang.org/appengine/datastore/internal/cloudkey
Expand All @@ -350,12 +394,14 @@ google.golang.org/appengine/internal/remote_api
google.golang.org/appengine/internal/urlfetch
google.golang.org/appengine/urlfetch
# google.golang.org/genproto v0.0.0-20200711021454-869866162049
## explicit
google.golang.org/genproto/googleapis/api/annotations
google.golang.org/genproto/googleapis/iam/v1
google.golang.org/genproto/googleapis/rpc/code
google.golang.org/genproto/googleapis/rpc/status
google.golang.org/genproto/googleapis/type/expr
# google.golang.org/grpc v1.32.0
## explicit
google.golang.org/grpc
google.golang.org/grpc/attributes
google.golang.org/grpc/backoff
Expand Down Expand Up @@ -401,6 +447,7 @@ google.golang.org/grpc/stats
google.golang.org/grpc/status
google.golang.org/grpc/tap
# google.golang.org/protobuf v1.25.0
## explicit
google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo
google.golang.org/protobuf/compiler/protogen
google.golang.org/protobuf/encoding/prototext
Expand Down

0 comments on commit c70a8bc

Please sign in to comment.