mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
move pkgname out of progress interface and move it into "Start()"
This commit is contained in:
@@ -48,7 +48,7 @@ func (ts *ProgressTestSuite) TestSpin(c *C) {
|
||||
oldStdout := os.Stdout
|
||||
os.Stdout = f
|
||||
|
||||
t := NewTextProgress("no-pkg")
|
||||
t := NewTextProgress()
|
||||
for i := 0; i < 6; i++ {
|
||||
t.Spin("m")
|
||||
}
|
||||
@@ -89,7 +89,7 @@ func (ts *ProgressTestSuite) testAgreed(answer string, value bool, c *C) {
|
||||
|
||||
license := "Void where empty."
|
||||
|
||||
t := NewTextProgress("no-pkg")
|
||||
t := NewTextProgress()
|
||||
c.Check(t.Agreed("blah blah", license), Equals, value)
|
||||
|
||||
_, err = fout.Seek(0, 0)
|
||||
@@ -115,7 +115,7 @@ func (ts *ProgressTestSuite) TestNotify(c *C) {
|
||||
fout.Close()
|
||||
}()
|
||||
|
||||
t := NewTextProgress("no-pkg")
|
||||
t := NewTextProgress()
|
||||
t.Notify("blah blah")
|
||||
|
||||
_, err = fout.Seek(0, 0)
|
||||
@@ -137,12 +137,12 @@ func (ts *ProgressTestSuite) TestMakeProgressBar(c *C) {
|
||||
|
||||
ts.attachedToTerminalReturn = true
|
||||
|
||||
pbar = MakeProgressBar("foo")
|
||||
c.Assert(pbar, FitsTypeOf, NewTextProgress("foo"))
|
||||
pbar = MakeProgressBar()
|
||||
c.Assert(pbar, FitsTypeOf, NewTextProgress())
|
||||
|
||||
ts.attachedToTerminalReturn = false
|
||||
|
||||
pbar = MakeProgressBar("bar")
|
||||
pbar = MakeProgressBar()
|
||||
c.Assert(pbar, FitsTypeOf, &NullProgress{})
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user