Skip to content

Commit

Permalink
chore(model): bump openfga to version w/ validation and drop our vali…
Browse files Browse the repository at this point in the history
…dation
  • Loading branch information
rhamzeh committed Aug 30, 2023
1 parent 0888d5c commit e43d7d2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/openfga/api/proto v0.0.0-20230801154117-db20ad164368
github.com/openfga/go-sdk v0.2.3-0.20230710203920-f6922b2d8c6d
github.com/openfga/language/pkg/go v0.0.0-20230823153854-0351dba7a7a3
github.com/openfga/openfga v1.3.2-0.20230828211348-ca86c92f3dc8
github.com/openfga/openfga v1.3.2-0.20230830154907-0a84f51ac01f
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.16.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ github.com/openfga/language/pkg/go v0.0.0-20230823153854-0351dba7a7a3 h1:ZKazvF9
github.com/openfga/language/pkg/go v0.0.0-20230823153854-0351dba7a7a3/go.mod h1:gU/4rU1D6bUxYkb4FofkwcmFaavpd2h3U2+x2qAeUnY=
github.com/openfga/openfga v1.3.2-0.20230828211348-ca86c92f3dc8 h1:ixfq/rhv5SLBmiQGp/3A3F8jqCY/cY7TjVRhG72noo4=
github.com/openfga/openfga v1.3.2-0.20230828211348-ca86c92f3dc8/go.mod h1:sotnTS8L+9/a5HRN/4Z646FVfU5fF42JIC1Is7xdtog=
github.com/openfga/openfga v1.3.2-0.20230830154907-0a84f51ac01f h1:a+TYFVNQsPI+pJaFDID9e+O2XkcK8EPdVGpvhSzCyao=
github.com/openfga/openfga v1.3.2-0.20230830154907-0a84f51ac01f/go.mod h1:sotnTS8L+9/a5HRN/4Z646FVfU5fF42JIC1Is7xdtog=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0=
Expand Down
12 changes: 1 addition & 11 deletions internal/storetest/localstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ func initLocalStore(
}

if authModelWriteReq != nil {
err := authModelWriteReq.ValidateAll()
if err != nil {
return nil, nil, err //nolint:wrapcheck
}

writtenModel, err := fgaServer.WriteAuthorizationModel(context.Background(), authModelWriteReq)
if err != nil {
return nil, nil, err //nolint:wrapcheck
Expand All @@ -59,12 +54,7 @@ func initLocalStore(
Writes: &pb.TupleKeys{TupleKeys: writeChunk},
}

err := writeRequest.ValidateAll()
if err != nil {
return nil, nil, err //nolint:wrapcheck
}

_, err = fgaServer.Write(context.Background(), writeRequest)
_, err := fgaServer.Write(context.Background(), writeRequest)
if err != nil {
return nil, nil, err //nolint:wrapcheck
}
Expand Down
7 changes: 0 additions & 7 deletions internal/storetest/localtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ func RunSingleLocalCheckTest(
Expected: expectation,
}

err := checkRequest.ValidateAll()
if err != nil {
result.Error = err

return result
}

res, err := fgaServer.Check(context.Background(), checkRequest)
if err != nil {
result.Error = err
Expand Down

0 comments on commit e43d7d2

Please sign in to comment.