Skip to content

Commit

Permalink
correcting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vhowdhur committed Sep 21, 2023
1 parent f20142c commit 7ebf5cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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
6 changes: 3 additions & 3 deletions gosnappi/snappigo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ func TestHttpGetMetricsPortResponse(t *testing.T) {
assert.NotNil(t, resp)
assert.Nil(t, err)
assert.Equal(t, resp.PortMetrics().Items()[0].Name(), string("port1"))
assert.Equal(t, resp.PortMetrics().Items()[0].BytesTx(), int64(2000))
assert.Equal(t, resp.PortMetrics().Items()[0].BytesRx(), int64(2000))
assert.Equal(t, resp.PortMetrics().Items()[0].BytesTx(), uint64(2000))
assert.Equal(t, resp.PortMetrics().Items()[0].BytesRx(), uint64(2000))
}

func TestGetMetricsPortResponseError(t *testing.T) {
Expand Down Expand Up @@ -283,7 +283,7 @@ func TestHttpGetMetricsBgpv4Response(t *testing.T) {
assert.NotNil(t, resp)
assert.Nil(t, err)
assert.Equal(t, resp.Bgpv4Metrics().Items()[0].Name(), string("BGP-1"))
assert.Equal(t, resp.Bgpv4Metrics().Items()[0].RoutesAdvertised(), int32(80))
assert.Equal(t, resp.Bgpv4Metrics().Items()[0].RoutesAdvertised(), uint32(80))
}

func TestGetMetricsBgpv4ResponseError(t *testing.T) {
Expand Down

0 comments on commit 7ebf5cc

Please sign in to comment.