Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3695)

Unified Diff: utils/apt_test.go

Issue 77890045: Fix maas bridge-utils installation
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« utils/apt.go ('K') | « utils/apt.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/apt_test.go
=== modified file 'utils/apt_test.go'
--- utils/apt_test.go 2014-03-13 20:52:41 +0000
+++ utils/apt_test.go 2014-03-20 09:08:27 +0000
@@ -39,6 +39,22 @@
c.Assert(packagesList[1], gc.DeepEquals, []string{"bridge-utils", "git"})
}
+func (s *AptSuite) TestAptGetCommand(c *gc.C) {
+ s.testAptGetCommand(c)
+ s.testAptGetCommand(c, "install", "foo")
+}
+
+func (s *AptSuite) testAptGetCommand(c *gc.C, args ...string) {
+ commonArgs := []string{
+ "env", "DEBIAN_FRONTEND=noninteractive",
+ "apt-get", "--option=Dpkg::Options::=--force-confold",
+ "--option=Dpkg::options::=--force-unsafe-io", "--assume-yes", "--quiet",
+ }
+ expected := append(commonArgs, args...)
+ cmd := utils.AptGetCommand(args...)
+ c.Assert(cmd, gc.DeepEquals, expected)
+}
+
func (s *AptSuite) TestAptGetError(c *gc.C) {
const expected = `E: frobnicator failure detected`
cmdError := fmt.Errorf("error")
« utils/apt.go ('K') | « utils/apt.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b