Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provision to reset database cache #5171

Merged
merged 1 commit into from
Mar 9, 2023
Merged

Conversation

msiripurapu05
Copy link

Reason to Update:
I am trying to write UT for DB connections by mocking db using github.com/DATA-DOG/go-sqlmock. I want to recreate mock db and set to orm just before execution each test case. However the current implementation of orm.AddAliasWthDB is not allowing to reset db driver once it is initialized. It will throw the error fmt.Errorf("DataBase alias name %s already registered, cannot reuse", aliasName)

@sonarcloud
Copy link

sonarcloud bot commented Mar 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@flycash flycash merged commit 3c6986a into beego:develop-1.x Mar 9, 2023
@msiripurapu05
Copy link
Author

@flycash Thank you for merging the changes. Could you please tag it to a release. So, we can start consuming the method.

@flycash
Copy link
Collaborator

flycash commented Mar 14, 2023

okay

@flycash
Copy link
Collaborator

flycash commented Mar 14, 2023

check it! hope you can help to improve Beego v1.x in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants