Add helpers for each addon in order to access their interactive console #111

Merged
merged 2 commits into from May 5, 2015

Projects

None yet

2 participants

@Soulou
Member
Soulou commented May 5, 2015

No description provided.

@Soulou Soulou merged commit 5b30f17 into master May 5, 2015
@q42jaap q42jaap commented on the diff Jul 20, 2015
db/mongo_console.go
+
+func MongoConsole(app string) error {
+
+ mongoURL, user, password, err := dbURL(app, "MONGO", []string{"mongodb://"})
+ if err != nil {
+ return errgo.Mask(err)
+ }
+
+ opts := apps.RunOpts{
+ App: app,
+ Cmd: []string{"mongo", "-u", user, "-p", password, mongoURL.Host + "/" + user},
+ }
+
+ err = apps.Run(opts)
+ if err != nil {
+ return errgo.Newf("Fail to run redis console: %v", err)
@q42jaap
q42jaap Jul 20, 2015

error message should probably mention "mongo" not "redis"

@Soulou
Soulou Jul 20, 2015 Member

Hi there, you're completely right, and it has been fixed there: 26b9d8f

Fixed in next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment