Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correct encode mongodb auth credentials (#10024)
* fix: correct encode mongodb auth credentials when use the special character `@` into mongodb password result in unauthorized because the it has no encoding Closes: #9885 * we need to close connections at the end * fixed js issue * adjust import statement * style: run prettier --------- Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
- Loading branch information
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { expect } from "chai" | ||
import { DataSource } from "../../../src" | ||
import { | ||
closeTestingConnections, | ||
createTestingConnections, | ||
} from "../../utils/test-utils" | ||
|
||
describe("github issues > #9885", () => { | ||
let dataSources: DataSource[] | ||
|
||
before(async () => { | ||
dataSources = await createTestingConnections({ | ||
entities: [], | ||
enabledDrivers: ["mongodb"], | ||
}) | ||
}) | ||
after(() => closeTestingConnections(dataSources)) | ||
|
||
it("should be connected", () => { | ||
dataSources.forEach((dataSource) => { | ||
expect(dataSource.isInitialized).true | ||
}) | ||
}) | ||
}) |