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

Mongo>>authenticateUsername:password:database: is failing #41

Closed
sebastianconcept opened this issue Dec 5, 2018 · 2 comments
Closed

Comments

@sebastianconcept
Copy link

sebastianconcept commented Dec 5, 2018

#nextPut: was sent to nil
UndefinedObject(Object)>>doesNotUnderstand: #nextPut:
LittleEndianStream>>nextBytePut:
LittleEndianStream>>nextInt32Put:
QueryOperation(MongoOperation)>>writeHeader
QueryOperation(MongoOperation)>>write
Mongo>>cursorQuery:
MongoCursor>>execute
Mongo>>queryOne:
Mongo>>command:database:
Mongo>>authenticateUsername:password:database:

Also, the last parameter in the tests

testAuthenticationSucceeds
	self assert: (mongo authenticateUsername: 'foo' password: 'bar' database: 'baz')

is used with the mock as, a user would expect, with the database name, but the method expects aDatabase object.

A quick fix for that would be to take the database name and, inside the method, use a local database temp like:

Mongo>>authenticateUsername: user password: pass database: databaseName
|database|
database := (MongoDatabase root: self name: databaseName)
...
@noha
Copy link
Contributor

noha commented Jun 24, 2019

There is no PR for this issue for a long time. Can we close this?

@tinchodias
Copy link
Contributor

I think it was a good suggestion to have method that receives the db name instead of the object, at least as a convenience method.

But as too long time passed, and I just created #87 about authentication, I'm closing this issue.

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

No branches or pull requests

3 participants