libAtoms / abcd

1 stars 4 forks source link

Login not checking validity #33

Closed gabor1 closed 5 years ago

gabor1 commented 5 years ago

The login subcommand should check whether the url is valid by performing (silently?) some database operation. But it could also print something useful, e.g. the number of entries in the database.

fekad commented 5 years ago

Login command returns with basic info about the conncetion:

abcd login mongodb://mongoadmin:secret@localhost:27017/abcd
Successfully connected to the database!
 type:       mongodb
 hostname:   localhost
 port:       27017
 database:   abcd
 # of confs: 79305

Wrong password:

abcd login mongodb://mongoadmin:secrsdfet@localhost:27017/abcd
Authentication failed.

Wrong url:

abcd login mongodb://mongoadmin:secret@localhossdft:27017/abcd
Wrong connection: Please check the parameters of th url!