# Test_MongoDBServer

Provides unit tests and examples for the MongoDBServer lens.

Summary

Test_MongoDBServer | Provides unit tests and examples for the MongoDBServer lens.
Augeas Variables |
conf |
Augeas Tests |
MongoDBServer.lns |
MongoDBServer.lns | Values have to be without quotes

### Augeas Variables

### conf

> let conf = "port = 27017 fork = true pidfilepath = /var/run/mongodb/mongodb.pid logpath = /var/log/mongodb/mongodb.log dbpath =/var/lib/mongodb journal = true nohttpinterface = true "

### Augeas Tests

### MongoDBServer.lns

> test MongoDBServer.lns get conf = { "port" = "27017" } { "fork" = "true" } { "pidfilepath" = "/var/run/mongodb/mongodb.pid" } { "logpath" = "/var/log/mongodb/mongodb.log" } { "dbpath" = "/var/lib/mongodb" } { "journal" = "true" } { "nohttpinterface" = "true" }

### MongoDBServer.lns

> test MongoDBServer.lns get "port = 27017\n" = { "port" = "27017" }

Values have to be without quotes

Parses /etc/mongodb.conf

> let conf = "port = 27017 fork = true pidfilepath = /var/run/mongodb/mongodb.pid logpath = /var/log/mongodb/mongodb.log dbpath =/var/lib/mongodb journal = true nohttpinterface = true "

> test MongoDBServer.lns get conf = { "port" = "27017" } { "fork" = "true" } { "pidfilepath" = "/var/run/mongodb/mongodb.pid" } { "logpath" = "/var/log/mongodb/mongodb.log" } { "dbpath" = "/var/lib/mongodb" } { "journal" = "true" } { "nohttpinterface" = "true" }

Close