github.com/deis/workflow-e2e@v2.12.2-0.20180227201524-4105be7001fe+incompatible/tests/cmd/configs/commands.go (about) 1 package configs 2 3 import ( 4 "github.com/deis/workflow-e2e/tests/cmd" 5 "github.com/deis/workflow-e2e/tests/model" 6 "github.com/deis/workflow-e2e/tests/settings" 7 8 . "github.com/onsi/gomega" 9 . "github.com/onsi/gomega/gbytes" 10 . "github.com/onsi/gomega/gexec" 11 ) 12 13 // The functions in this file implement SUCCESS CASES for commonly used `deis config` subcommands. 14 // This allows each of these to be re-used easily in multiple contexts. 15 16 // Set executes `deis config:set` on the specified app as the specified user. 17 func Set(user model.User, app model.App, key string, value string) *Session { 18 sess, err := cmd.Start("deis config:set %s=%s --app=%s", &user, key, value, app.Name) 19 Expect(err).NotTo(HaveOccurred()) 20 sess.Wait(settings.MaxEventuallyTimeout) 21 Eventually(sess).Should(Say("Creating config...")) 22 Eventually(sess).Should(Exit(0)) 23 return sess 24 }