You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we do not have a test for GetFeaturePhaseByUUID
Design
We want to write the tests to use a real Postgres DB spun up on docker, follow the instructions in the Unit Testing section of README.md to run spin up a database in docker, and change the test_config.go configuration.
After spinning up the Postgres DB container:
Add this line of code on the first line and second of the test function TestGetFeaturePhaseByUUID to connect to the Test DB
Context
Currently, we do not have a test for GetFeaturePhaseByUUID
Design
We want to write the tests to use a real Postgres DB spun up on docker, follow the instructions in the
Unit Testing
section of README.md to run spin up a database in docker, and change thetest_config.go
configuration.After spinning up the Postgres DB container:
TestGetFeaturePhaseByUUID
to connect to the Test DBThe test will throw a dereference error if not connected to a DB.
db.TestDb.CreateOrPerson()
function e.gdb.TestDb.CreateOrEditWorkspace()
function e.gworkspace:= db.TestDb.GetWorkspaceByUuid(workspace.Uuid)
db.TestDb.CreateOrEditFeature(feature)
function e.gdb.TestDb.CreateOrEditFeaturePhase(featurePhase)
function e.gr.Get("/{feature_uuid}/phase/{phase_uuid}", featureHandlers.GetFeaturePhaseByUUID)
as a reference, the test routeUuid
as the URL parameter401
error if a user is not authorizedAssertions
Acceptance Criteria
Here is an example Real DB Test
The text was updated successfully, but these errors were encountered: