Skip to content

Commit

Permalink
fix number rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrodriges authored Jun 6, 2024
1 parent 1bded92 commit 0fc3b71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/metricstest/iteration3b_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (suite *Iteration3BSuite) TestGauge() {
id := strconv.Itoa(rand.Intn(256))
req := httpc.R()
for i := 0; i < count; i++ {
v := strings.TrimRight(strings.TrimRight(fmt.Sprintf("%.3f", rand.Float64()*1000000), "0"), ".")
v := strings.TrimRight(fmt.Sprintf("%.3f", rand.Float64()*1000000), "0.")
resp, err := req.Post("update/gauge/testSetGet" + id + "/" + v)
noRespErr := suite.Assert().NoError(err,
"Ошибка при попытке сделать запрос с обновлением gauge")
Expand Down
2 changes: 1 addition & 1 deletion cmd/metricstest/iteration4_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (suite *Iteration4Suite) TestGauge() {
id := strconv.Itoa(rand.Intn(256))
req := httpc.R()
for i := 0; i < count; i++ {
v := strings.TrimRight(fmt.Sprintf("%.3f", rand.Float64()*1000000), "0")
v := strings.TrimRight(fmt.Sprintf("%.3f", rand.Float64()*1000000), "0.")
resp, err := req.Post("update/gauge/testSetGet" + id + "/" + v)
noRespErr := suite.Assert().NoError(err,
"Ошибка при попытке сделать запрос с обновлением gauge")
Expand Down

0 comments on commit 0fc3b71

Please sign in to comment.