Skip to content

Commit

Permalink
s3: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
cavedon authored and neolynx committed Jan 21, 2024
1 parent 5541ac9 commit 01ac631
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions s3/public_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ func (s *PublishedStorageSuite) TearDownTest(c *C) {
s.srv.Quit()
}

func (s *PublishedStorageSuite) checkGetRequestsEqual(c *C, prefix string, expectedGetRequestUris []string) {
getRequests := make([]string, 0, len(s.srv.Requests))

Check failure on line 54 in s3/public_test.go

View workflow job for this annotation

GitHub Actions / test

s.srv.Requests undefined (type *Server has no field or method Requests)
for _, r := range s.srv.Requests {

Check failure on line 55 in s3/public_test.go

View workflow job for this annotation

GitHub Actions / test

s.srv.Requests undefined (type *Server has no field or method Requests)
if r.Method == "GET" && strings.HasPrefix(r.RequestURI, prefix) {

Check failure on line 56 in s3/public_test.go

View workflow job for this annotation

GitHub Actions / test

undefined: strings
getRequests = append(getRequests, r.RequestURI)
}
}
sort.Strings(getRequests)

Check failure on line 60 in s3/public_test.go

View workflow job for this annotation

GitHub Actions / test

undefined: sort
c.Check(getRequests, DeepEquals, expectedGetRequestUris)
}

func (s *PublishedStorageSuite) GetFile(c *C, path string) []byte {
resp, err := s.storage.s3.GetObject(context.TODO(), &s3.GetObjectInput{
Bucket: aws.String(s.storage.bucket),
Expand Down

0 comments on commit 01ac631

Please sign in to comment.