Merged in feature/textextraction (pull request #110)

Text Extraction

* bases

* go

* splitting

* structure

* movetoasync

* movetoasync

* settinguptrigger

* reorder

* storevent

* standardisepollingvalidation

* unittests

* fixlint

* fixlint

* awscfg

* generatesample

* followthrough

* tests

* clena

* store

* externalidcleanup

* clientid

* local

* baseunittests

* putobjecttests

* tests
This commit is contained in:
Michael McGuinness
2025-04-02 18:50:03 +00:00
parent e6a4cb3990
commit 81e7223560
226 changed files with 17283 additions and 2744 deletions
+6 -31
View File
@@ -33,7 +33,7 @@ func TestCreate(t *testing.T) {
svc := New(cfg)
clientId := uuid.New()
clientId := "hi"
doc := document.DocumentSummary{
ID: uuid.New(),
ClientID: clientId,
@@ -101,7 +101,7 @@ func TestGetCreateParams(t *testing.T) {
svc := New(cfg)
doc := document.DocumentSummary{
ClientID: uuid.New(),
ClientID: "hello",
Hash: "example_hash",
}
location := document.Location{
@@ -139,7 +139,7 @@ func TestGetCreateParamsExisting(t *testing.T) {
doc := document.DocumentSummary{
ID: uuid.New(),
ClientID: uuid.New(),
ClientID: "hello",
Hash: "example_hash",
}
location := document.Location{
@@ -179,7 +179,7 @@ func TestGetCreateParamsCurrentDocErr(t *testing.T) {
svc := New(cfg)
doc := document.DocumentSummary{
ClientID: uuid.New(),
ClientID: "hello",
Hash: "example_hash",
}
location := document.Location{
@@ -210,7 +210,7 @@ func TestSubmitCreate(t *testing.T) {
doc := document.DocumentSummary{
ID: uuid.New(),
ClientID: uuid.New(),
ClientID: "hello",
Hash: "example_hash",
}
location := document.Location{
@@ -250,7 +250,7 @@ func TestSubmitCreateExists(t *testing.T) {
doc := document.DocumentSummary{
ID: uuid.New(),
ClientID: uuid.New(),
ClientID: "hello",
Hash: "example_hash",
}
location := document.Location{
@@ -273,28 +273,3 @@ func TestSubmitCreateExists(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, doc.ID, id)
}
func TestGetClientIDFromKey(t *testing.T) {
svc := Service{}
_, err := svc.GetClientIDFromKey("")
assert.Error(t, err)
_, err = svc.GetClientIDFromKey("jkhaskhweuifhwhieh")
assert.Error(t, err)
_, err = svc.GetClientIDFromKey("aaa/bbb/ccc")
assert.Error(t, err)
id := uuid.New()
_, err = svc.GetClientIDFromKey(fmt.Sprintf("aaa/%s/bbb", id.String()))
assert.Error(t, err)
aid, err := svc.GetClientIDFromKey(fmt.Sprintf("%s/%s/bbb", id.String(), uuid.NewString()))
require.NoError(t, err)
assert.Equal(t, id, aid)
aid, err = svc.GetClientIDFromKey(fmt.Sprintf("%s/bbb", id.String()))
require.NoError(t, err)
assert.Equal(t, id, aid)
}