Skip to content

Commit

Permalink
Merge branch 'main' into x-unique
Browse files Browse the repository at this point in the history
# Conflicts:
#	requirements.txt
  • Loading branch information
vhowdhur committed Oct 16, 2023
2 parents 3a46f46 + adde0e2 commit 94d45ce
Show file tree
Hide file tree
Showing 18 changed files with 18,562 additions and 18,928 deletions.
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
--prefer-binary
requests
openapiart==0.3.3
openapiart==0.3.4
5 changes: 3 additions & 2 deletions gosnappi/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (api *api) FromError(err error) (Error, bool) {
func (api *api) setResponseErr(obj Error, code int32, message string) {
errors := []string{}
errors = append(errors, message)
obj.Msg().Code = code
obj.Msg().Code = &code
obj.Msg().Errors = errors
}

Expand All @@ -218,7 +218,8 @@ func (api *api) fromGrpcError(err error) (Error, bool) {
if ok {
rErr := NewError()
if err := rErr.FromJson(st.Message()); err == nil {
rErr.Msg().Code = int32(st.Code())
var code = int32(st.Code())
rErr.Msg().Code = &code
return rErr, true
}

Expand Down
6 changes: 3 additions & 3 deletions gosnappi/generated_required_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ func TestTransmitStateRequired(t *testing.T) {
err1 := object.FromYaml(string(data))
protoMarshal, _ := proto.Marshal(object.Msg())
err2 := object.FromPbText(string(protoMarshal))
assert.Nil(t, err)
assert.Nil(t, err1)
assert.Nil(t, err2)
assert.NotNil(t, err)
assert.NotNil(t, err1)
assert.NotNil(t, err2)
}
func TestLinkStateRequired(t *testing.T) {
object := gosnappi.NewControlState().Port().Link()
Expand Down
2 changes: 1 addition & 1 deletion gosnappi/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ require (
github.com/ghodss/yaml v1.0.0
github.com/gorilla/mux v1.8.0
github.com/stretchr/testify v1.8.4
google.golang.org/grpc v1.58.1
google.golang.org/grpc v1.58.3
google.golang.org/protobuf v1.31.0
)
4 changes: 2 additions & 2 deletions gosnappi/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1665,8 +1665,8 @@ google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwS
google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g=
google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=
google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58=
google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ=
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
Expand Down
Loading

0 comments on commit 94d45ce

Please sign in to comment.