Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/cognito
@@ -137,6 +137,25 @@ func TestGetDocumentText(t *testing.T) {
|
||||
|
||||
assertReaders(t, txtFile, text)
|
||||
})
|
||||
// t.Run("sampleOne - chc_1", func(t *testing.T) {
|
||||
// t.Parallel()
|
||||
// cfg := DocTextConfig{}
|
||||
// svc := Service{
|
||||
// cfg: &cfg,
|
||||
// }
|
||||
// mockTextract := textractmock.NewMockTextractClient(t)
|
||||
// cfg.TextractClient = mockTextract
|
||||
|
||||
// textractBaseOut, pdf, txtFile, close := getFiles(t, "sampleOne", "chc_1")
|
||||
// defer close()
|
||||
|
||||
// textExpectations(t, mockTextract, textractBaseOut)
|
||||
|
||||
// text, err := svc.getDocumentText(ctx, pdf)
|
||||
// require.NoError(t, err)
|
||||
|
||||
// assertReaders(t, txtFile, text)
|
||||
// })
|
||||
}
|
||||
|
||||
func getFiles(t testing.TB, sample string, filename string) (map[string][]textract.AnalyzeDocumentOutput, *documenttypes.PDF, *os.File, func()) {
|
||||
|
||||
@@ -28,8 +28,7 @@ tasks:
|
||||
fullsuite:
|
||||
- task: build
|
||||
- task: lint
|
||||
- task: test:unit
|
||||
- task: test:endtoend
|
||||
- task: test:all
|
||||
precommit:
|
||||
- task: lint:short
|
||||
deps:tidy:
|
||||
|
||||
@@ -57,6 +57,18 @@ tasks:
|
||||
CLI_ARGS: |
|
||||
-coverpkg={{.INTERNAL}},{{.API}} \
|
||||
-coverprofile={{.COVERAGE_FILE}}
|
||||
- task: coverage
|
||||
silent: true
|
||||
endtoend:
|
||||
deps:
|
||||
- docker:build
|
||||
cmds:
|
||||
- go test -count=1 -parallel {{.E2E_PARALLEL}} ./test/...
|
||||
coverage:
|
||||
vars:
|
||||
TMP_FILE: "{{.OUT_DIR}}/coverage.tmp"
|
||||
FILTER_COVERAGE_FILE: "{{.OUT_DIR}}/filtered_coverage.out"
|
||||
cmds:
|
||||
- |
|
||||
grep -v -E "{{.EXCLUDED_FILES}}" {{.COVERAGE_FILE}} \
|
||||
> {{.FILTER_COVERAGE_FILE}}
|
||||
@@ -94,9 +106,12 @@ tasks:
|
||||
fi
|
||||
|
||||
echo "✅ All coverage checks passed!"
|
||||
silent: true
|
||||
endtoend:
|
||||
deps:
|
||||
- docker:build
|
||||
all:
|
||||
cmds:
|
||||
- go test -count=1 -parallel {{.E2E_PARALLEL}} ./test/...
|
||||
- mkdir -p {{.OUT_DIR}}
|
||||
- |
|
||||
go test -count=1 -parallel {{.UNIT_PARALLEL}} \
|
||||
-coverpkg={{.INTERNAL}},{{.API}},{{.PKG}} \
|
||||
-coverprofile={{.COVERAGE_FILE}} \
|
||||
./...
|
||||
- task: coverage
|
||||
|
||||
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |