nvim-neotest / neotest-go

MIT License
125 stars 43 forks source link

Test Output formatted for non-human-readable #32

Closed hahuang65 closed 1 year ago

hahuang65 commented 1 year ago

When I run a file in Go, the test output is difficult to read:

{"Time":"2022-12-22T21:49:17.327822502-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto"}
{"Time":"2022-12-22T21:49:17.327945324-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto","Output":"=== RUN   TestPhoto\n"}
{"Time":"2022-12-22T21:49:17.327968507-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate"}
{"Time":"2022-12-22T21:49:17.327975801-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate","Output":"=== RUN   TestPhoto/Validate\n"}
{"Time":"2022-12-22T21:49:17.327985449-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate/NoErrorsBaseline"}
{"Time":"2022-12-22T21:49:17.32799128-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate/NoErrorsBaseline","Output":"=== RUN   TestPhoto/Validate/NoErrorsBaseline\n"}
{"Time":"2022-12-22T21:49:17.327999977-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate/ErrorsWhenPoolIDIsNil"}
{"Time":"2022-12-22T21:49:17.328005487-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate/ErrorsWhenPoolIDIsNil","Output":"=== RUN   TestPhoto/Validate/ErrorsWhenPoolIDIsNil\n"}
{"Time":"2022-12-22T21:49:17.328057425-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate/ErrorsWhenContentIsInvalid"}
{"Time":"2022-12-22T21:49:17.328063607-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate/ErrorsWhenContentIsInvalid","Output":"=== RUN   TestPhoto/Validate/ErrorsWhenContentIsInvalid\n"}
{"Time":"2022-12-22T21:49:17.328075179-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New"}
{"Time":"2022-12-22T21:49:17.328082573-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New","Output":"=== RUN   TestPhoto/New\n"}
{"Time":"2022-12-22T21:49:17.328277881-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New/SetsID"}
{"Time":"2022-12-22T21:49:17.328307387-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New/SetsID","Output":"=== RUN   TestPhoto/New/SetsID\n"}
{"Time":"2022-12-22T21:49:17.328326183-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New/SetsPoolID"}
{"Time":"2022-12-22T21:49:17.32834065-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New/SetsPoolID","Output":"=== RUN   TestPhoto/New/SetsPoolID\n"}
{"Time":"2022-12-22T21:49:17.32835652-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New/SetsContent"}
{"Time":"2022-12-22T21:49:17.328369845-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New/SetsContent","Output":"=== RUN   TestPhoto/New/SetsContent\n"}
{"Time":"2022-12-22T21:49:17.328389071-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto","Output":"--- PASS: TestPhoto (0.00s)\n"}
{"Time":"2022-12-22T21:49:17.328404601-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate","Output":"    --- PASS: TestPhoto/Validate (0.00s)\n"}
{"Time":"2022-12-22T21:49:17.328421162-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate/NoErrorsBaseline","Output":"        --- PASS: TestPhoto/Validate/NoErrorsBaseline (0.00s)\n"}
{"Time":"2022-12-22T21:49:17.328438214-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate/NoErrorsBaseline","Elapsed":0}
{"Time":"2022-12-22T21:49:17.328458152-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate/ErrorsWhenPoolIDIsNil","Output":"        --- PASS: TestPhoto/Validate/ErrorsWhenPoolIDIsNil (0.00s)\n"}
{"Time":"2022-12-22T21:49:17.32846784-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate/ErrorsWhenPoolIDIsNil","Elapsed":0}
{"Time":"2022-12-22T21:49:17.32847854-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate/ErrorsWhenContentIsInvalid","Output":"        --- PASS: TestPhoto/Validate/ErrorsWhenContentIsInvalid (0.00s)\n"}
{"Time":"2022-12-22T21:49:17.328487758-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate/ErrorsWhenContentIsInvalid","Elapsed":0}
{"Time":"2022-12-22T21:49:17.32849429-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/Validate","Elapsed":0}
{"Time":"2022-12-22T21:49:17.328501574-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New","Output":"    --- PASS: TestPhoto/New (0.00s)\n"}
{"Time":"2022-12-22T21:49:17.32851017-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New/SetsID","Output":"        --- PASS: TestPhoto/New/SetsID (0.00s)\n"}
{"Time":"2022-12-22T21:49:17.328517794-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New/SetsID","Elapsed":0}
{"Time":"2022-12-22T21:49:17.328523405-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New/SetsPoolID","Output":"        --- PASS: TestPhoto/New/SetsPoolID (0.00s)\n"}
{"Time":"2022-12-22T21:49:17.328530388-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New/SetsPoolID","Elapsed":0}
{"Time":"2022-12-22T21:49:17.328536089-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New/SetsContent","Output":"        --- PASS: TestPhoto/New/SetsContent (0.00s)\n"}
{"Time":"2022-12-22T21:49:17.328542431-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New/SetsContent","Elapsed":0}
{"Time":"2022-12-22T21:49:17.32854738-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto/New","Elapsed":0}
{"Time":"2022-12-22T21:49:17.32855235-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhoto","Elapsed":0}
{"Time":"2022-12-22T21:49:17.328557279-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository"}
{"Time":"2022-12-22T21:49:17.328562198-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"=== RUN   TestPhotoS3Repository\n"}
{"Time":"2022-12-22T21:49:17.333287369-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"2022/12/22 21:49:17 github.com/testcontainers/testcontainers-go - Connected to docker: \n"}
{"Time":"2022-12-22T21:49:17.333320622-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"  Server Version: 20.10.21\n"}
{"Time":"2022-12-22T21:49:17.333328517-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"  API Version: 1.41\n"}
{"Time":"2022-12-22T21:49:17.333334288-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"  Operating System: Arch Linux\n"}
{"Time":"2022-12-22T21:49:17.333341-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"  Total Memory: 15900 MB\n"}
{"Time":"2022-12-22T21:49:17.360758673-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"2022/12/22 21:49:17 Starting container id: 99b51a7fe0f6 image: docker.io/testcontainers/ryuk:0.3.4\n"}
{"Time":"2022-12-22T21:49:17.627491606-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"2022/12/22 21:49:17 Waiting for container id 99b51a7fe0f6 image: docker.io/testcontainers/ryuk:0.3.4\n"}
{"Time":"2022-12-22T21:49:17.830847358-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"2022/12/22 21:49:17 Container is ready id: 99b51a7fe0f6 image: docker.io/testcontainers/ryuk:0.3.4\n"}
{"Time":"2022-12-22T21:49:17.867058201-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"2022/12/22 21:49:17 Starting container id: 7ebc0c5e0500 image: localstack/localstack\n"}
{"Time":"2022-12-22T21:49:18.136949838-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"2022/12/22 21:49:18 Waiting for container id 7ebc0c5e0500 image: localstack/localstack\n"}
{"Time":"2022-12-22T21:49:20.654270755-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"2022/12/22 21:49:20 Container is ready id: 7ebc0c5e0500 image: localstack/localstack\n"}
{"Time":"2022-12-22T21:49:20.655444451-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"Localstack running @ http://172.17.0.4:4566\n"}
{"Time":"2022-12-22T21:49:20.655458578-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"Access Localstack with: `LOCALSTACK_HOST=172.17.0.4 awslocal ...`\n"}
{"Time":"2022-12-22T21:49:21.782431965-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create"}
{"Time":"2022-12-22T21:49:21.782459908-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create","Output":"=== RUN   TestPhotoS3Repository/Create\n"}
{"Time":"2022-12-22T21:49:21.782468674-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/CreateReturnsNilErrorOnSuccess"}
{"Time":"2022-12-22T21:49:21.782473053-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/CreateReturnsNilErrorOnSuccess","Output":"=== RUN   TestPhotoS3Repository/Create/CreateReturnsNilErrorOnSuccess\n"}
{"Time":"2022-12-22T21:49:21.789359473-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/ReturnsPhotosForPool"}
{"Time":"2022-12-22T21:49:21.78936848-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/ReturnsPhotosForPool","Output":"=== RUN   TestPhotoS3Repository/Create/ReturnsPhotosForPool\n"}
{"Time":"2022-12-22T21:49:21.85753788-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/DoesNotCreateDuplicateImages"}
{"Time":"2022-12-22T21:49:21.857568698-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/DoesNotCreateDuplicateImages","Output":"=== RUN   TestPhotoS3Repository/Create/DoesNotCreateDuplicateImages\n"}
{"Time":"2022-12-22T21:49:22.073357221-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/DoesNotCreateDuplicateImages","Output":"    repository_suitetest.go:53: \n"}
{"Time":"2022-12-22T21:49:22.073385945-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/DoesNotCreateDuplicateImages","Output":"        \tError Trace:\t/home/hao/Documents/Projects/photopool/photopool-api/internal/models/photo/repository_suitetest.go:53\n"}
{"Time":"2022-12-22T21:49:22.073396946-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/DoesNotCreateDuplicateImages","Output":"        \tError:      \tNot equal: \n"}
{"Time":"2022-12-22T21:49:22.073401835-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/DoesNotCreateDuplicateImages","Output":"        \t            \texpected: 6\n"}
{"Time":"2022-12-22T21:49:22.073406043-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/DoesNotCreateDuplicateImages","Output":"        \t            \tactual  : 1\n"}
{"Time":"2022-12-22T21:49:22.073410422-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/DoesNotCreateDuplicateImages","Output":"        \tTest:       \tTestPhotoS3Repository/Create/DoesNotCreateDuplicateImages\n"}
{"Time":"2022-12-22T21:49:22.073422474-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID"}
{"Time":"2022-12-22T21:49:22.073426251-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID","Output":"=== RUN   TestPhotoS3Repository/GetByPoolID\n"}
{"Time":"2022-12-22T21:49:22.073431942-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID/ReturnsEmptySliceWhenNoPhotosExistForPool"}
{"Time":"2022-12-22T21:49:22.073435639-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID/ReturnsEmptySliceWhenNoPhotosExistForPool","Output":"=== RUN   TestPhotoS3Repository/GetByPoolID/ReturnsEmptySliceWhenNoPhotosExistForPool\n"}
{"Time":"2022-12-22T21:49:22.078717932-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID"}
{"Time":"2022-12-22T21:49:22.078728642-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID","Output":"=== RUN   TestPhotoS3Repository/DeleteByPoolIDAndID\n"}
{"Time":"2022-12-22T21:49:22.078736046-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID/ReturnsNilErrorWhenSuccessful"}
{"Time":"2022-12-22T21:49:22.078739453-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID/ReturnsNilErrorWhenSuccessful","Output":"=== RUN   TestPhotoS3Repository/DeleteByPoolIDAndID/ReturnsNilErrorWhenSuccessful\n"}
{"Time":"2022-12-22T21:49:22.103243535-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID/RemovesItFromTheRepository"}
{"Time":"2022-12-22T21:49:22.103265917-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID/RemovesItFromTheRepository","Output":"=== RUN   TestPhotoS3Repository/DeleteByPoolIDAndID/RemovesItFromTheRepository\n"}
{"Time":"2022-12-22T21:49:22.312222743-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID/ReturnsNotFoundErrorWhenPoolDoesNotExist"}
{"Time":"2022-12-22T21:49:22.312252809-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID/ReturnsNotFoundErrorWhenPoolDoesNotExist","Output":"=== RUN   TestPhotoS3Repository/DeleteByPoolIDAndID/ReturnsNotFoundErrorWhenPoolDoesNotExist\n"}
{"Time":"2022-12-22T21:49:22.318610803-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create#01"}
{"Time":"2022-12-22T21:49:22.31861979-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create#01","Output":"=== RUN   TestPhotoS3Repository/Create#01\n"}
{"Time":"2022-12-22T21:49:22.318627324-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create#01/PersistsAPhoto"}
{"Time":"2022-12-22T21:49:22.318634979-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create#01/PersistsAPhoto","Output":"=== RUN   TestPhotoS3Repository/Create#01/PersistsAPhoto\n"}
{"Time":"2022-12-22T21:49:22.331346707-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID#01"}
{"Time":"2022-12-22T21:49:22.331365403-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID#01","Output":"=== RUN   TestPhotoS3Repository/GetByPoolID#01\n"}
{"Time":"2022-12-22T21:49:22.331379349-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID#01/ReturnsAllPhotosForAPool"}
{"Time":"2022-12-22T21:49:22.331386913-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID#01/ReturnsAllPhotosForAPool","Output":"=== RUN   TestPhotoS3Repository/GetByPoolID#01/ReturnsAllPhotosForAPool\n"}
{"Time":"2022-12-22T21:49:22.474846665-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID#01"}
{"Time":"2022-12-22T21:49:22.474877534-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID#01","Output":"=== RUN   TestPhotoS3Repository/DeleteByPoolIDAndID#01\n"}
{"Time":"2022-12-22T21:49:22.480250407-08:00","Action":"run","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID#01/RemovesTheFileFromS3"}
{"Time":"2022-12-22T21:49:22.480267069-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID#01/RemovesTheFileFromS3","Output":"=== RUN   TestPhotoS3Repository/DeleteByPoolIDAndID#01/RemovesTheFileFromS3\n"}
{"Time":"2022-12-22T21:49:22.787197492-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Output":"--- FAIL: TestPhotoS3Repository (5.46s)\n"}
{"Time":"2022-12-22T21:49:22.787262184-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create","Output":"    --- FAIL: TestPhotoS3Repository/Create (0.29s)\n"}
{"Time":"2022-12-22T21:49:22.7872816-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/CreateReturnsNilErrorOnSuccess","Output":"        --- PASS: TestPhotoS3Repository/Create/CreateReturnsNilErrorOnSuccess (0.01s)\n"}
{"Time":"2022-12-22T21:49:22.787305405-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/CreateReturnsNilErrorOnSuccess","Elapsed":0.01}
{"Time":"2022-12-22T21:49:22.7873184-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/ReturnsPhotosForPool","Output":"        --- PASS: TestPhotoS3Repository/Create/ReturnsPhotosForPool (0.07s)\n"}
{"Time":"2022-12-22T21:49:22.787326034-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/ReturnsPhotosForPool","Elapsed":0.07}
{"Time":"2022-12-22T21:49:22.787336214-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/DoesNotCreateDuplicateImages","Output":"        --- FAIL: TestPhotoS3Repository/Create/DoesNotCreateDuplicateImages (0.22s)\n"}
{"Time":"2022-12-22T21:49:22.787343888-08:00","Action":"fail","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create/DoesNotCreateDuplicateImages","Elapsed":0.22}
{"Time":"2022-12-22T21:49:22.787349869-08:00","Action":"fail","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create","Elapsed":0.29}
{"Time":"2022-12-22T21:49:22.787355811-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID","Output":"    --- PASS: TestPhotoS3Repository/GetByPoolID (0.01s)\n"}
{"Time":"2022-12-22T21:49:22.787363645-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID/ReturnsEmptySliceWhenNoPhotosExistForPool","Output":"        --- PASS: TestPhotoS3Repository/GetByPoolID/ReturnsEmptySliceWhenNoPhotosExistForPool (0.01s)\n"}
{"Time":"2022-12-22T21:49:22.78737168-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID/ReturnsEmptySliceWhenNoPhotosExistForPool","Elapsed":0.01}
{"Time":"2022-12-22T21:49:22.787377602-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID","Elapsed":0.01}
{"Time":"2022-12-22T21:49:22.787383984-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID","Output":"    --- PASS: TestPhotoS3Repository/DeleteByPoolIDAndID (0.24s)\n"}
{"Time":"2022-12-22T21:49:22.787390787-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID/ReturnsNilErrorWhenSuccessful","Output":"        --- PASS: TestPhotoS3Repository/DeleteByPoolIDAndID/ReturnsNilErrorWhenSuccessful (0.02s)\n"}
{"Time":"2022-12-22T21:49:22.78739795-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID/ReturnsNilErrorWhenSuccessful","Elapsed":0.02}
{"Time":"2022-12-22T21:49:22.787403921-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID/RemovesItFromTheRepository","Output":"        --- PASS: TestPhotoS3Repository/DeleteByPoolIDAndID/RemovesItFromTheRepository (0.21s)\n"}
{"Time":"2022-12-22T21:49:22.787410694-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID/RemovesItFromTheRepository","Elapsed":0.21}
{"Time":"2022-12-22T21:49:22.787417988-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID/ReturnsNotFoundErrorWhenPoolDoesNotExist","Output":"        --- PASS: TestPhotoS3Repository/DeleteByPoolIDAndID/ReturnsNotFoundErrorWhenPoolDoesNotExist (0.01s)\n"}
{"Time":"2022-12-22T21:49:22.787425242-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID/ReturnsNotFoundErrorWhenPoolDoesNotExist","Elapsed":0.01}
{"Time":"2022-12-22T21:49:22.787430912-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID","Elapsed":0.24}
{"Time":"2022-12-22T21:49:22.787436613-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create#01","Output":"    --- PASS: TestPhotoS3Repository/Create#01 (0.01s)\n"}
{"Time":"2022-12-22T21:49:22.787443185-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create#01/PersistsAPhoto","Output":"        --- PASS: TestPhotoS3Repository/Create#01/PersistsAPhoto (0.01s)\n"}
{"Time":"2022-12-22T21:49:22.787449898-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create#01/PersistsAPhoto","Elapsed":0.01}
{"Time":"2022-12-22T21:49:22.787455318-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/Create#01","Elapsed":0.01}
{"Time":"2022-12-22T21:49:22.787460869-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID#01","Output":"    --- PASS: TestPhotoS3Repository/GetByPoolID#01 (0.14s)\n"}
{"Time":"2022-12-22T21:49:22.787467531-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID#01/ReturnsAllPhotosForAPool","Output":"        --- PASS: TestPhotoS3Repository/GetByPoolID#01/ReturnsAllPhotosForAPool (0.14s)\n"}
{"Time":"2022-12-22T21:49:22.787474495-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID#01/ReturnsAllPhotosForAPool","Elapsed":0.14}
{"Time":"2022-12-22T21:49:22.787480125-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/GetByPoolID#01","Elapsed":0.14}
{"Time":"2022-12-22T21:49:22.787489493-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID#01","Output":"    --- PASS: TestPhotoS3Repository/DeleteByPoolIDAndID#01 (0.03s)\n"}
{"Time":"2022-12-22T21:49:22.78749832-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID#01/RemovesTheFileFromS3","Output":"        --- PASS: TestPhotoS3Repository/DeleteByPoolIDAndID#01/RemovesTheFileFromS3 (0.02s)\n"}
{"Time":"2022-12-22T21:49:22.787504792-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID#01/RemovesTheFileFromS3","Elapsed":0.02}
{"Time":"2022-12-22T21:49:22.787510282-08:00","Action":"pass","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository/DeleteByPoolIDAndID#01","Elapsed":0.03}
{"Time":"2022-12-22T21:49:22.787515602-08:00","Action":"fail","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Test":"TestPhotoS3Repository","Elapsed":5.46}
{"Time":"2022-12-22T21:49:22.787521002-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Output":"FAIL\n"}
{"Time":"2022-12-22T21:49:22.7888967-08:00","Action":"output","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Output":"FAIL\tgithub.com/bitsmithy/photopool-api/internal/models/photo\t5.474s\n"}
{"Time":"2022-12-22T21:49:22.788921106-08:00","Action":"fail","Package":"github.com/bitsmithy/photopool-api/internal/models/photo","Elapsed":5.474}
RomanMelnyk113 commented 1 year ago

any updates on this issue? maybe there some workaround to disable that output?

akinsho commented 1 year ago

Just so people don't waste lots of time expecting someone else to swoop in, there is no maintainer for this project. I got it up and running, but it works entirely on user contributions I'm not even working with go currently, so some other invested party will need to investigate and raise a PR 🙏🏿

sergii4 commented 1 year ago

@hahuang65 Could you please provide more details? Where that output comes from? What are a setup and steps to reproduce? From your description it is unclear what is issue about.

@RomanMelnyk113 if you can provide any details it would be helpful

hahuang65 commented 1 year ago

@sergii4 thanks for following up on this... This happens when I run require("neotest").run.run(vim.fn.expand("%")) and my cursor is on a line for a sub-test:

grim_03_08_23-10_42_07

If I'm on a blank line, or the actual function for the test, the output is saner, but still somewhat un-useful: grim_03_08_23-10_42_53

While on the test function, the output will show the error: grim_03_08_23-10_44_32

sergii4 commented 1 year ago

Thanks, @hahuang65! I will take a look on weekend.

sergii4 commented 1 year ago

@hahuang65 I was trying to reproduce the bug, I put cursor on subtest line and executed:

:lua require("neotest").run.run(vim.fn.expand("%"))

output seems pretty regular to me

Screenshot 2023-03-12 at 22 07 19
hahuang65 commented 1 year ago

@sergii4 hmm this must be something specific to my project, as I've just created a throwaway package and I'm not running into this issue.

I did get 5 :+1: on my initial issue, and @RomanMelnyk113 also seems to run into this. I wonder if anyone knows how to reproduce it.

I'll poke around my project and try to see if I can figure out what is going on.

@sergii4 thank you for taking the time to look into this so far!

RomanMelnyk113 commented 1 year ago

Hello @hahuang65 @sergii4 and thanks for looking into this problem!
yeah, I'm also having this when running (doesn't matter where cursor is) :lua require("neotest").run.run(vim.fn.expand("%"))

But the problem is only for floating output window :lua require("neotest").output.open({ enter = true, last_run = true })

And it shows okay when using output_panel :lua require("neotest").output_panel.toggle({ last_run = true, enter = true })

image

It also worth to mention that this problem doesn't appear when running single test with following command :lua require("neotest").run.run()

P.S. my guess this is something goes wrong here https://github.com/nvim-neotest/neotest-go/blob/45737334fe8f0e9df4848865d11f70c49956baca/lua/neotest-go/output.lua#L45

sergii4 commented 1 year ago

Hi @hahuang65 @RomanMelnyk113, I reproduced issue with:

:lua require("neotest").output.open({ enter = true })

and even with:

:lua require("neotest").output.open({ })

Thank for a hint :) . I keep looking

sergii4 commented 1 year ago

I have found the problem. Fix is coming

sergii4 commented 1 year ago

@RomanMelnyk113 @hahuang65 neotest provides test output regarding nearest test position to cursor, for ex., nested test:

image

function level test:

image

But there is problem on the file level

image
sergii4 commented 1 year ago

@hahuang65 @RomanMelnyk113 could you please update the neotest-go and check if issue still reproduces?

hahuang65 commented 1 year ago

@sergii4 looks good to me.

sergii4 commented 1 year ago

@hahuang65 thanks, I am closing it then.