Skip to content

Docker Build Error Due to Test Fail #287

@ArmoredGoat

Description

@ArmoredGoat

Before You Submit

  • I've already checked this bug hasn't been raised in issues

Description

Building the Docker image from source according to the instructions leads to errors due to failed unit tests in backend.
Passing --no-test to ./build.sh has no impact.

Steps to reproduce

  1. Clone git repository
  2. Change into dir and be on main branch
  3. Execute sudo ./build.sh docker [--no-test] (--no-test does not change outcome)
  4. Build will not finsih due to several failed unit tests in backend (see log files below)

ezBookkeeping Version

v1.1.1 (697f69d)

Server Operating System

not applicable

Database

not applicable

Can you reproduce this bug on the ezBookkeeping demo site?

No

Additional information

Example Output

[...]
2025-10-08 19:06:02 [WARNING] [international_monetary_fund_datasource.parseExchangeRate] no exchange rate data exists for currency "CNY", line is Chinese yuan  
                                
    common_http_exchange_rates_data_provider_test.go:342: 
                Error Trace:    /go/src/github.com/mayswind/ezbookkeeping/pkg/exchangerates/common_http_exchange_rates_data_provider_test.go:342
                                                        /go/src/github.com/mayswind/ezbookkeeping/pkg/exchangerates/common_http_exchange_rates_data_provider_test.go:31
1
                Error:          Not equal: 
                                expected: 36
                                actual  : 35
                Test:           TestExchangeRatesApiLatestExchangeRateHandler_InternationalMonetaryFundDataSource
    common_http_exchange_rates_data_provider_test.go:355: 
                Error Trace:    /go/src/github.com/mayswind/ezbookkeeping/pkg/exchangerates/common_http_exchange_rates_data_provider_test.go:355
                                                        /go/src/github.com/mayswind/ezbookkeeping/pkg/exchangerates/common_http_exchange_rates_data_provider_test.go:31
1
                Error:          Should be true
                Test:           TestExchangeRatesApiLatestExchangeRateHandler_InternationalMonetaryFundDataSource
                Messages:       CNY
--- FAIL: TestExchangeRatesApiLatestExchangeRateHandler_InternationalMonetaryFundDataSource (1.21s)
[...]
[...]
2025-10-08 19:06:02 [WARNING] [00000000-0000-0000-0000-00000000] [swiss_national_bank_datasource.ToLatestExchangeRate] failed to parse unit, currency is EUR, unit expo
nent is null
2025-10-08 19:06:02 [WARNING] [00000000-0000-0000-0000-00000000] [swiss_national_bank_datasource.ToLatestExchangeRate] unit exponent is zero, currency is EUR
--- PASS: TestSwissNationalBankDataSource_InvalidUnit (0.00s)
FAIL
FAIL    github.com/mayswind/ezbookkeeping/pkg/exchangerates     6.427s
?       github.com/mayswind/ezbookkeeping/pkg/llm       [no test files]
?       github.com/mayswind/ezbookkeeping/pkg/llm/data  [no test files]
?       github.com/mayswind/ezbookkeeping/pkg/llm/provider      [no test files]
?       github.com/mayswind/ezbookkeeping/pkg/llm/provider/common       [no test files]
=== RUN   TestGoogleAILargeLanguageModelAdapter_buildJsonRequestBody_TextualUserPrompt
--- PASS: TestGoogleAILargeLanguageModelAdapter_buildJsonRequestBody_TextualUserPrompt (0.00s)
=== RUN   TestGoogleAILargeLanguageModelAdapter_buildJsonRequestBody_ImageUserPrompt
[...]
[...]
--- PASS: TestValidUsername (0.00s)
=== RUN   TestInvalidUsername
--- PASS: TestInvalidUsername (0.00s)
PASS
ok      github.com/mayswind/ezbookkeeping/pkg/validators        0.011s
FAIL
Error: Failed to pass unit testing

Build Logs

build.log
build-no-test.log

Temporary Workaround

Edit Dockerfile in base directory and change line 15 from

RUN ./build.sh backend

to

RUN ./build.sh backend --no-tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions