Skip to content

Commit

Permalink
refactoring; base_test small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
oke11o committed Mar 7, 2024
1 parent 68a8c52 commit e844e79
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions components/guns/http/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ func (s *BaseGunSuite) Test_Shoot() {
am *ammomock.Ammo
req *http.Request
tag string
res *http.Response
sample *netsample.Sample
results *netsample.TestAggregator
shootErr error
Expand All @@ -168,11 +167,7 @@ func (s *BaseGunSuite) Test_Shoot() {
justBeforeEach := func() {
sample = netsample.Acquire(tag)
am.On("Request").Return(req, sample).Maybe()
res = &http.Response{
StatusCode: http.StatusNotFound,
Body: ioutil.NopCloser(body),
Request: req,
}

s.base.Shoot(am)
s.Require().Len(results.Samples, 1)
shootErr = results.Samples[0].Err()
Expand Down Expand Up @@ -202,7 +197,7 @@ func (s *BaseGunSuite) Test_Shoot() {
s.Assert().Len(results.Samples, 1)
s.Assert().Equal(sample, results.Samples[0])
s.Assert().Equal("__EMPTY__", sample.Tags())
s.Assert().Equal(res.StatusCode, sample.ProtoCode())
s.Assert().Equal(http.StatusNotFound, sample.ProtoCode())
_ = shootErr
})

Expand Down

0 comments on commit e844e79

Please sign in to comment.