From e43d7d229432a610878c21cf3bb9146c5ca647c5 Mon Sep 17 00:00:00 2001 From: Raghd Hamzeh Date: Wed, 30 Aug 2023 15:38:19 -0400 Subject: [PATCH] chore(model): bump openfga to version w/ validation and drop our validation --- go.mod | 2 +- go.sum | 2 ++ internal/storetest/localstore.go | 12 +----------- internal/storetest/localtest.go | 7 ------- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index 3d9763d6..780dc32f 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 8f19cfe8..759afca5 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/internal/storetest/localstore.go b/internal/storetest/localstore.go index f9da0425..8b774f72 100644 --- a/internal/storetest/localstore.go +++ b/internal/storetest/localstore.go @@ -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 @@ -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 } diff --git a/internal/storetest/localtest.go b/internal/storetest/localtest.go index 960ad4f0..dc15fe18 100644 --- a/internal/storetest/localtest.go +++ b/internal/storetest/localtest.go @@ -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