Internal state persistence (#27)
Badges / coveralls (push) Successful in 1m4s

Allow us to generate year over year reports without having to rerun everything from the beginning.

Co-authored-by: Natercio Moniz <[email protected]>
This commit was merged in pull request #27.
This commit is contained in:
2026-08-03 00:33:06 +01:00
committed by natercio
parent 1ce8561782
commit 9bd4230ff1
25 changed files with 1726 additions and 178 deletions
+6 -5
View File
@@ -9,6 +9,7 @@ import (
"time"
"github.com/nmoniz/any2anexoj/internal"
"github.com/nmoniz/any2anexoj/internal/ofigi"
"github.com/shopspring/decimal"
)
@@ -221,7 +222,7 @@ func TestRecordReader_ReadRecord_Split(t *testing.T) {
func Test_figiNatureGetter(t *testing.T) {
tests := []struct {
name string // description of this test case
of *internal.OpenFIGI
of *ofigi.Client
want internal.Nature
}{
{
@@ -272,7 +273,7 @@ func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) {
return f(req)
}
func NewFigiClientSecurityTypeStub(t testing.TB, securityType string) *internal.OpenFIGI {
func NewFigiClientSecurityTypeStub(t testing.TB, securityType string) *ofigi.Client {
t.Helper()
c := &http.Client{
@@ -287,10 +288,10 @@ func NewFigiClientSecurityTypeStub(t testing.TB, securityType string) *internal.
}),
}
return internal.NewOpenFIGI(c, "")
return ofigi.NewOpenFIGI(c, "")
}
func NewFigiClientErrorStub(t testing.TB, err error) *internal.OpenFIGI {
func NewFigiClientErrorStub(t testing.TB, err error) *ofigi.Client {
t.Helper()
c := &http.Client{
@@ -300,5 +301,5 @@ func NewFigiClientErrorStub(t testing.TB, err error) *internal.OpenFIGI {
}),
}
return internal.NewOpenFIGI(c, "")
return ofigi.NewOpenFIGI(c, "")
}