nebraska
nebraska copied to clipboard
fixed env load for db creds in api backend
Fixed dotenv loading for DB and other config
DB config was not getting picked from env file. Added dotenv to load in for backend api.
Testing done
Connects successfully to db on build
Hello @anistark, as a new dependency was added, and the pipeline fails the diff check after the go mod tidy command, I think the tidied up version should be committed to pass the diff check.
Tests are failing as connections cannot be formed:
...
Test: TestGetApp/success
--- FAIL: TestGetApp/success_product_id (0.17s)
app_test.go:173:
Error Trace: /home/runner/work/nebraska/nebraska/backend/test/api/helper_test.go:104
/home/runner/work/nebraska/nebraska/backend/test/api/app_test.go:173
Error: Received unexpected error:
Get "http://localhost:8002/api/apps/io.kinvolk.sample": dial tcp [::1]:8002: connect: connection refused
Test: TestGetApp/success_product_id
--- FAIL: TestUpdateApp (0.34s)
--- FAIL: TestUpdateApp/success (0.17s)
app_test.go:200:
Error Trace: /home/runner/work/nebraska/nebraska/backend/test/api/helper_test.go:104
/home/runner/work/nebraska/nebraska/backend/test/api/app_test.go:200
Error: Received unexpected error:
Put "http://localhost:8002/api/apps/b6458005-8f40-4627-b33b-be70a718c48e": dial tcp [::1]:8002: connect: connection refused
...
Since there's too many changes to the project in the due time, it's getting difficult to rebase properly. Will reopen in a fresh PR.