postgres-switch-for-tests #255
No reviewers
Labels
No Label
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Activity
Doing
Activity
Hold
Activity
Proposal
Activity
QA
Activity
Validate
Runner
AT
Runner
CLI
Runner
HTTP
Runner
SSH
cleanup
devops
documentation
easypeasy
exchange
i18n
legacy
meta
migration
optimization
privilege
refactor
smell
support
tooling
ux
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: urdt/ussd#255
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "postgres-switch-for-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
also resolves #119
WIP: postgres-switch-for-teststo postgres-switch-for-testsI am wondering, since this affects the connection string, whether we should merge in the other PR into this one first.
@ -27,3 +29,3 @@
func init() {
initializers.LoadEnvVariables()
initializers.LoadEnvVariables(baseDir)
I don't think we want to use the
testdataloader
package in main. Let's remove the basedir, and if needed using a different env/config file should be a matter of switches.@ -88,6 +89,11 @@ func (ms *MenuStorageService) getOrCreateDb(ctx context.Context, existingDb db.D
return nil, fmt.Errorf("failed to select the database")
}
schema, ok := ctx.Value("Schema").(string)
can we try to use the connection string instead of context, if it works? https://github.com/jackc/pgx/issues/1013
it fits better with the connection string refactor that I will merge this into afterwards.
@ -101,0 +105,4 @@
connStr := BuildConnStr()
// Ensure the schema exists
err = ensureSchemaExists(ctx, connStr, schema)
If we are using connection string, then this needs to be url parsed to get the query string in order to determine the schema.