Merge lp:~sergiusens/snappy/dont_get_this into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by Sergio Schvezov
Status: Merged
Merged at revision: 123
Proposed branch: lp:~sergiusens/snappy/dont_get_this
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Diff against target: 423 lines (+64/-67)
9 files modified
cmd/snappy/cmd_booted.go (+1/-1)
cmd/snappy/cmd_info.go (+3/-3)
snappy/list.go (+2/-2)
snappy/parts.go (+12/-12)
snappy/remove.go (+1/-1)
snappy/snapp.go (+7/-9)
snappy/snapp_test.go (+23/-23)
snappy/systemimage.go (+8/-9)
snappy/systemimage_test.go (+7/-7)
To merge this branch: bzr merge lp:~sergiusens/snappy/dont_get_this
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Review via email: mp+247765@code.launchpad.net

Description of the change

https://golang.org/doc/effective_go.html#Getters

Even though these aren't properties for fields per se, they are properties of the system and I'm going to use common idomatic go from around (no Get in the names).

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks Sergio, this looks good and is more idiomatic go. The only small adjustment I made is that "OtherPart" -> "otherPart" and "CurrentPart" -> "currentPart" as I consider this more internal API (Installed() is the API the user should use).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'cmd/snappy/cmd_booted.go'
--- cmd/snappy/cmd_booted.go 2015-01-26 14:13:15 +0000
+++ cmd/snappy/cmd_booted.go 2015-01-27 19:16:59 +0000
@@ -15,7 +15,7 @@
15}15}
1616
17func (x *CmdBooted) Execute(args []string) (err error) {17func (x *CmdBooted) Execute(args []string) (err error) {
18 parts, err := snappy.GetInstalledSnappsByType("core")18 parts, err := snappy.InstalledSnappsByType("core")
19 if err != nil {19 if err != nil {
20 return err20 return err
21 }21 }
2222
=== modified file 'cmd/snappy/cmd_info.go'
--- cmd/snappy/cmd_info.go 2015-01-26 14:30:14 +0000
+++ cmd/snappy/cmd_info.go 2015-01-27 19:16:59 +0000
@@ -25,13 +25,13 @@
2525
26func info() error {26func info() error {
27 release := "unknown"27 release := "unknown"
28 parts, err := snappy.GetInstalledSnappsByType("core")28 parts, err := snappy.InstalledSnappsByType("core")
29 if len(parts) == 1 && err == nil {29 if len(parts) == 1 && err == nil {
30 release = parts[0].(*snappy.SystemImagePart).Channel()30 release = parts[0].(*snappy.SystemImagePart).Channel()
31 }31 }
3232
33 frameworks, _ := snappy.GetInstalledSnappNamesByType("framework")33 frameworks, _ := snappy.InstalledSnappNamesByType("framework")
34 apps, _ := snappy.GetInstalledSnappNamesByType("app")34 apps, _ := snappy.InstalledSnappNamesByType("app")
3535
36 fmt.Printf("release: %s\n", release)36 fmt.Printf("release: %s\n", release)
37 fmt.Printf("architecture: %s\n", snappy.Architecture())37 fmt.Printf("architecture: %s\n", snappy.Architecture())
3838
=== modified file 'snappy/list.go'
--- snappy/list.go 2015-01-26 14:13:15 +0000
+++ snappy/list.go 2015-01-27 19:16:59 +0000
@@ -3,11 +3,11 @@
3func ListInstalled() ([]Part, error) {3func ListInstalled() ([]Part, error) {
4 m := NewMetaRepository()4 m := NewMetaRepository()
55
6 return m.GetInstalled()6 return m.Installed()
7}7}
88
9func ListUpdates() ([]Part, error) {9func ListUpdates() ([]Part, error) {
10 m := NewMetaRepository()10 m := NewMetaRepository()
1111
12 return m.GetUpdates()12 return m.Updates()
13}13}
1414
=== modified file 'snappy/parts.go'
--- snappy/parts.go 2015-01-27 08:18:14 +0000
+++ snappy/parts.go 2015-01-27 19:16:59 +0000
@@ -42,8 +42,8 @@
42 Search(terms string) ([]Part, error)42 Search(terms string) ([]Part, error)
43 Details(snappName string) ([]Part, error)43 Details(snappName string) ([]Part, error)
4444
45 GetUpdates() ([]Part, error)45 Updates() ([]Part, error)
46 GetInstalled() ([]Part, error)46 Installed() ([]Part, error)
47}47}
4848
49type MetaRepository struct {49type MetaRepository struct {
@@ -70,9 +70,9 @@
70 return m70 return m
71}71}
7272
73func (m *MetaRepository) GetInstalled() (parts []Part, err error) {73func (m *MetaRepository) Installed() (parts []Part, err error) {
74 for _, r := range m.all {74 for _, r := range m.all {
75 installed, err := r.GetInstalled()75 installed, err := r.Installed()
76 if err != nil {76 if err != nil {
77 return parts, err77 return parts, err
78 }78 }
@@ -82,9 +82,9 @@
82 return parts, err82 return parts, err
83}83}
8484
85func (m *MetaRepository) GetUpdates() (parts []Part, err error) {85func (m *MetaRepository) Updates() (parts []Part, err error) {
86 for _, r := range m.all {86 for _, r := range m.all {
87 updates, err := r.GetUpdates()87 updates, err := r.Updates()
88 if err != nil {88 if err != nil {
89 return parts, err89 return parts, err
90 }90 }
@@ -118,9 +118,9 @@
118 return parts, err118 return parts, err
119}119}
120120
121func GetInstalledSnappsByType(searchExp string) (res []Part, err error) {121func InstalledSnappsByType(searchExp string) (res []Part, err error) {
122 m := NewMetaRepository()122 m := NewMetaRepository()
123 installed, err := m.GetInstalled()123 installed, err := m.Installed()
124 if err != nil {124 if err != nil {
125 return res, err125 return res, err
126 }126 }
@@ -138,17 +138,17 @@
138 return138 return
139}139}
140140
141var GetInstalledSnappNamesByType = func(snappType string) (res []string, err error) {141var InstalledSnappNamesByType = func(snappType string) (res []string, err error) {
142 installed, err := GetInstalledSnappsByType(snappType)142 installed, err := InstalledSnappsByType(snappType)
143 for _, part := range installed {143 for _, part := range installed {
144 res = append(res, part.Name())144 res = append(res, part.Name())
145 }145 }
146 return146 return
147}147}
148148
149func GetInstalledSnappByName(needle string) Part {149func InstalledSnappByName(needle string) Part {
150 m := NewMetaRepository()150 m := NewMetaRepository()
151 installed, err := m.GetInstalled()151 installed, err := m.Installed()
152 if err != nil {152 if err != nil {
153 return nil153 return nil
154 }154 }
155155
=== modified file 'snappy/remove.go'
--- snappy/remove.go 2015-01-26 14:13:15 +0000
+++ snappy/remove.go 2015-01-27 19:16:59 +0000
@@ -1,7 +1,7 @@
1package snappy1package snappy
22
3func Remove(partName string) error {3func Remove(partName string) error {
4 part := GetInstalledSnappByName(partName)4 part := InstalledSnappByName(partName)
5 if part != nil {5 if part != nil {
6 if err := part.Uninstall(); err != nil {6 if err := part.Uninstall(); err != nil {
7 return err7 return err
88
=== modified file 'snappy/snapp.go'
--- snappy/snapp.go 2015-01-26 14:30:14 +0000
+++ snappy/snapp.go 2015-01-27 19:16:59 +0000
@@ -181,13 +181,11 @@
181 return versions, err181 return versions, err
182}182}
183183
184func (s *SnappLocalRepository) GetUpdates() (parts []Part, err error) {184func (s *SnappLocalRepository) Updates() (parts []Part, err error) {
185
186 return parts, err185 return parts, err
187}186}
188187
189func (s *SnappLocalRepository) GetInstalled() (parts []Part, err error) {188func (s *SnappLocalRepository) Installed() (parts []Part, err error) {
190
191 globExpr := path.Join(s.path, "*", "*", "meta", "package.yaml")189 globExpr := path.Join(s.path, "*", "*", "meta", "package.yaml")
192 matches, err := filepath.Glob(globExpr)190 matches, err := filepath.Glob(globExpr)
193 if err != nil {191 if err != nil {
@@ -332,7 +330,7 @@
332330
333 // set headers331 // set headers
334 req.Header.Set("Accept", "application/hal+json")332 req.Header.Set("Accept", "application/hal+json")
335 frameworks, _ := GetInstalledSnappNamesByType("framework")333 frameworks, _ := InstalledSnappNamesByType("framework")
336 frameworks = append(frameworks, "ubuntu-core-15.04-dev1")334 frameworks = append(frameworks, "ubuntu-core-15.04-dev1")
337 req.Header.Set("X-Ubuntu-Frameworks", strings.Join(frameworks, ","))335 req.Header.Set("X-Ubuntu-Frameworks", strings.Join(frameworks, ","))
338 req.Header.Set("X-Ubuntu-Architecture", Architecture())336 req.Header.Set("X-Ubuntu-Architecture", Architecture())
@@ -366,7 +364,7 @@
366364
367 // set headers365 // set headers
368 req.Header.Set("Accept", "application/hal+json")366 req.Header.Set("Accept", "application/hal+json")
369 frameworks, _ := GetInstalledSnappNamesByType("framework")367 frameworks, _ := InstalledSnappNamesByType("framework")
370 frameworks = append(frameworks, "ubuntu-core-15.04-dev1")368 frameworks = append(frameworks, "ubuntu-core-15.04-dev1")
371 req.Header.Set("X-Ubuntu-Frameworks", strings.Join(frameworks, ","))369 req.Header.Set("X-Ubuntu-Frameworks", strings.Join(frameworks, ","))
372 req.Header.Set("X-Ubuntu-Architecture", Architecture())370 req.Header.Set("X-Ubuntu-Architecture", Architecture())
@@ -393,10 +391,10 @@
393 return parts, err391 return parts, err
394}392}
395393
396func (s *SnappUbuntuStoreRepository) GetUpdates() (parts []Part, err error) {394func (s *SnappUbuntuStoreRepository) Updates() (parts []Part, err error) {
397 // the store only supports apps and framworks currently, so no395 // the store only supports apps and framworks currently, so no
398 // sense in sending it our ubuntu-core snapp396 // sense in sending it our ubuntu-core snapp
399 installed, err := GetInstalledSnappNamesByType("app,framework")397 installed, err := InstalledSnappNamesByType("app,framework")
400 if err != nil || len(installed) == 0 {398 if err != nil || len(installed) == 0 {
401 return parts, err399 return parts, err
402 }400 }
@@ -431,6 +429,6 @@
431 return parts, nil429 return parts, nil
432}430}
433431
434func (s *SnappUbuntuStoreRepository) GetInstalled() (parts []Part, err error) {432func (s *SnappUbuntuStoreRepository) Installed() (parts []Part, err error) {
435 return parts, err433 return parts, err
436}434}
437435
=== modified file 'snappy/snapp_test.go'
--- snappy/snapp_test.go 2015-01-23 19:28:17 +0000
+++ snappy/snapp_test.go 2015-01-27 19:16:59 +0000
@@ -108,7 +108,7 @@
108 snapp := NewLocalSnappRepository(path.Join(s.tempdir, "apps"))108 snapp := NewLocalSnappRepository(path.Join(s.tempdir, "apps"))
109 c.Assert(snapp, NotNil)109 c.Assert(snapp, NotNil)
110110
111 installed, err := snapp.GetInstalled()111 installed, err := snapp.Installed()
112 c.Assert(err, IsNil)112 c.Assert(err, IsNil)
113 c.Assert(len(installed), Equals, 1)113 c.Assert(len(installed), Equals, 1)
114 c.Assert(installed[0].Name(), Equals, "hello-app")114 c.Assert(installed[0].Name(), Equals, "hello-app")
@@ -159,16 +159,16 @@
159const MockUpdatesJson = `159const MockUpdatesJson = `
160[160[
161 {161 {
162 "status": "Published", 162 "status": "Published",
163 "name": "hello-world", 163 "name": "hello-world",
164 "changelog": "", 164 "changelog": "",
165 "icon_url": "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/01/hello.svg.png", 165 "icon_url": "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/01/hello.svg.png",
166 "title": "Hello world example", 166 "title": "Hello world example",
167 "binary_filesize": 31166, 167 "binary_filesize": 31166,
168 "anon_download_url": "https://public.apps.ubuntu.com/anon/download/com.ubuntu.snappy/hello-world/hello-world_1.0.5_all.snap", 168 "anon_download_url": "https://public.apps.ubuntu.com/anon/download/com.ubuntu.snappy/hello-world/hello-world_1.0.5_all.snap",
169 "allow_unauthenticated": true, 169 "allow_unauthenticated": true,
170 "version": "1.0.5", 170 "version": "1.0.5",
171 "download_url": "https://public.apps.ubuntu.com/download/com.ubuntu.snappy/hello-world/hello-world_1.0.5_all.snap", 171 "download_url": "https://public.apps.ubuntu.com/download/com.ubuntu.snappy/hello-world/hello-world_1.0.5_all.snap",
172 "download_sha512": "3e8b192e18907d8195c2e380edd048870eda4f6dbcba8f65e4625d6efac3c37d11d607147568ade6f002b6baa30762c6da02e7ee462de7c56301ddbdc10d87f6"172 "download_sha512": "3e8b192e18907d8195c2e380edd048870eda4f6dbcba8f65e4625d6efac3c37d11d607147568ade6f002b6baa30762c6da02e7ee462de7c56301ddbdc10d87f6"
173 }173 }
174]174]
@@ -270,17 +270,17 @@
270 c.Assert(results[0].Description(), Equals, "Show random XKCD comic")270 c.Assert(results[0].Description(), Equals, "Show random XKCD comic")
271}271}
272272
273func mockGetInstalledSnappNamesByType(mockSnapps []string) (mockRestorer func()) {273func mockInstalledSnappNamesByType(mockSnapps []string) (mockRestorer func()) {
274 origFunc := GetInstalledSnappNamesByType274 origFunc := InstalledSnappNamesByType
275 GetInstalledSnappNamesByType = func(snappType string) (res []string, err error) {275 InstalledSnappNamesByType = func(snappType string) (res []string, err error) {
276 return mockSnapps, nil276 return mockSnapps, nil
277 }277 }
278 return func() {278 return func() {
279 GetInstalledSnappNamesByType = origFunc279 InstalledSnappNamesByType = origFunc
280 }280 }
281}281}
282282
283func (s *SnappTestSuite) TestUbuntuStoreRepositoryGetUpdates(c *C) {283func (s *SnappTestSuite) TestUbuntuStoreRepositoryUpdates(c *C) {
284 mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {284 mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
285 json_req, err := ioutil.ReadAll(r.Body)285 json_req, err := ioutil.ReadAll(r.Body)
286 c.Assert(err, IsNil)286 c.Assert(err, IsNil)
@@ -295,20 +295,20 @@
295 c.Assert(snapp, NotNil)295 c.Assert(snapp, NotNil)
296 snapp.bulkUri = mockServer.URL + "/updates/"296 snapp.bulkUri = mockServer.URL + "/updates/"
297297
298 // override the real GetInstalledSnappNamesByType to return our298 // override the real InstalledSnappNamesByType to return our
299 // mock data299 // mock data
300 mockRestorer := mockGetInstalledSnappNamesByType([]string{"hello-world"})300 mockRestorer := mockInstalledSnappNamesByType([]string{"hello-world"})
301 defer mockRestorer()301 defer mockRestorer()
302302
303 // the actual test303 // the actual test
304 results, err := snapp.GetUpdates()304 results, err := snapp.Updates()
305 c.Assert(err, IsNil)305 c.Assert(err, IsNil)
306 c.Assert(len(results), Equals, 1)306 c.Assert(len(results), Equals, 1)
307 c.Assert(results[0].Name(), Equals, "hello-world")307 c.Assert(results[0].Name(), Equals, "hello-world")
308 c.Assert(results[0].Version(), Equals, "1.0.5")308 c.Assert(results[0].Version(), Equals, "1.0.5")
309}309}
310310
311func (s *SnappTestSuite) TestUbuntuStoreRepositoryGetUpdatesNoSnapps(c *C) {311func (s *SnappTestSuite) TestUbuntuStoreRepositoryUpdatesNoSnapps(c *C) {
312312
313 snapp := NewUbuntuStoreSnappRepository()313 snapp := NewUbuntuStoreSnappRepository()
314 c.Assert(snapp, NotNil)314 c.Assert(snapp, NotNil)
@@ -316,16 +316,16 @@
316 // ensure we do not hit the net if there is nothing installed316 // ensure we do not hit the net if there is nothing installed
317 // (otherwise the store will send us all snapps)317 // (otherwise the store will send us all snapps)
318 snapp.bulkUri = "http://i-do.not-exist.really-not"318 snapp.bulkUri = "http://i-do.not-exist.really-not"
319 mockRestorer := mockGetInstalledSnappNamesByType([]string{})319 mockRestorer := mockInstalledSnappNamesByType([]string{})
320 defer mockRestorer()320 defer mockRestorer()
321321
322 // the actual test322 // the actual test
323 results, err := snapp.GetUpdates()323 results, err := snapp.Updates()
324 c.Assert(err, IsNil)324 c.Assert(err, IsNil)
325 c.Assert(len(results), Equals, 0)325 c.Assert(len(results), Equals, 0)
326}326}
327327
328func (s *SnappTestSuite) TestUbuntuStoreRepositoryGetDetails(c *C) {328func (s *SnappTestSuite) TestUbuntuStoreRepositoryDetails(c *C) {
329 mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {329 mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
330 c.Assert(strings.HasSuffix(r.URL.String(), "xkcd-webserver"), Equals, true)330 c.Assert(strings.HasSuffix(r.URL.String(), "xkcd-webserver"), Equals, true)
331 io.WriteString(w, MockDetailsJson)331 io.WriteString(w, MockDetailsJson)
332332
=== modified file 'snappy/systemimage.go'
--- snappy/systemimage.go 2015-01-27 11:41:12 +0000
+++ snappy/systemimage.go 2015-01-27 19:16:59 +0000
@@ -416,7 +416,7 @@
416 partition: s.partition}, err416 partition: s.partition}, err
417}417}
418418
419func (s *SystemImageRepository) getCurrentPart() Part {419func (s *SystemImageRepository) CurrentPart() Part {
420 configFile := s.myroot + systemImageChannelConfig420 configFile := s.myroot + systemImageChannelConfig
421 part, err := s.makePartFromSystemImageConfigFile(configFile, true)421 part, err := s.makePartFromSystemImageConfigFile(configFile, true)
422 if err != nil {422 if err != nil {
@@ -426,7 +426,7 @@
426}426}
427427
428// Returns the part associated with the other rootfs (if any)428// Returns the part associated with the other rootfs (if any)
429func (s *SystemImageRepository) getOtherPart() Part {429func (s *SystemImageRepository) OtherPart() Part {
430 var part Part430 var part Part
431 s.partition.RunWithOther(func(otherRoot string) (err error) {431 s.partition.RunWithOther(func(otherRoot string) (err error) {
432 configFile := s.myroot + otherRoot + systemImageChannelConfig432 configFile := s.myroot + otherRoot + systemImageChannelConfig
@@ -442,7 +442,7 @@
442func (s *SystemImageRepository) Search(terms string) (versions []Part, err error) {442func (s *SystemImageRepository) Search(terms string) (versions []Part, err error) {
443 if strings.Contains(terms, systemImagePartName) {443 if strings.Contains(terms, systemImagePartName) {
444 s.proxy.Information()444 s.proxy.Information()
445 part := s.getCurrentPart()445 part := s.CurrentPart()
446 versions = append(versions, part)446 versions = append(versions, part)
447 }447 }
448 return versions, err448 return versions, err
@@ -451,14 +451,13 @@
451func (s *SystemImageRepository) Details(snappName string) (versions []Part, err error) {451func (s *SystemImageRepository) Details(snappName string) (versions []Part, err error) {
452 if snappName == systemImagePartName {452 if snappName == systemImagePartName {
453 s.proxy.Information()453 s.proxy.Information()
454 part := s.getCurrentPart()454 part := s.CurrentPart()
455 versions = append(versions, part)455 versions = append(versions, part)
456 }456 }
457 return versions, err457 return versions, err
458}458}
459459
460func (s *SystemImageRepository) GetUpdates() (parts []Part, err error) {460func (s *SystemImageRepository) Updates() (parts []Part, err error) {
461
462 if _, err = s.proxy.CheckForUpdate(); err != nil {461 if _, err = s.proxy.CheckForUpdate(); err != nil {
463 return parts, err462 return parts, err
464 }463 }
@@ -479,15 +478,15 @@
479 return parts, err478 return parts, err
480}479}
481480
482func (s *SystemImageRepository) GetInstalled() (parts []Part, err error) {481func (s *SystemImageRepository) Installed() (parts []Part, err error) {
483 // current partition482 // current partition
484 curr := s.getCurrentPart()483 curr := s.CurrentPart()
485 if curr != nil {484 if curr != nil {
486 parts = append(parts, curr)485 parts = append(parts, curr)
487 }486 }
488487
489 // other partition488 // other partition
490 other := s.getOtherPart()489 other := s.OtherPart()
491 if other != nil {490 if other != nil {
492 parts = append(parts, other)491 parts = append(parts, other)
493 }492 }
494493
=== modified file 'snappy/systemimage_test.go'
--- snappy/systemimage_test.go 2015-01-26 10:05:08 +0000
+++ snappy/systemimage_test.go 2015-01-27 19:16:59 +0000
@@ -248,7 +248,7 @@
248248
249func (s *SITestSuite) TestTestInstalled(c *C) {249func (s *SITestSuite) TestTestInstalled(c *C) {
250 // whats installed250 // whats installed
251 parts, err := s.systemImage.GetInstalled()251 parts, err := s.systemImage.Installed()
252 c.Assert(err, IsNil)252 c.Assert(err, IsNil)
253 // we have one active and one inactive253 // we have one active and one inactive
254 c.Assert(len(parts), Equals, 2)254 c.Assert(len(parts), Equals, 2)
@@ -262,16 +262,16 @@
262 c.Assert(parts[1].Version(), Equals, "3.14")262 c.Assert(parts[1].Version(), Equals, "3.14")
263}263}
264264
265func (s *SITestSuite) TestGetUpdateNoUpdate(c *C) {265func (s *SITestSuite) TestUpdateNoUpdate(c *C) {
266 parts, err := s.systemImage.GetUpdates()266 parts, err := s.systemImage.Updates()
267 c.Assert(err, IsNil)267 c.Assert(err, IsNil)
268 c.Assert(len(parts), Equals, 0)268 c.Assert(len(parts), Equals, 0)
269}269}
270270
271func (s *SITestSuite) TestGetUpdateHasUpdate(c *C) {271func (s *SITestSuite) TestUpdateHasUpdate(c *C) {
272 // add a update272 // add a update
273 s.mockSystemImage.info["target_build_number"] = "3.14"273 s.mockSystemImage.info["target_build_number"] = "3.14"
274 parts, err := s.systemImage.GetUpdates()274 parts, err := s.systemImage.Updates()
275 c.Assert(err, IsNil)275 c.Assert(err, IsNil)
276 c.Assert(len(parts), Equals, 1)276 c.Assert(len(parts), Equals, 1)
277 c.Assert(parts[0].Name(), Equals, "ubuntu-core")277 c.Assert(parts[0].Name(), Equals, "ubuntu-core")
@@ -308,7 +308,7 @@
308func (s *SITestSuite) TestSystemImagePartInstallUpdatesPartition(c *C) {308func (s *SITestSuite) TestSystemImagePartInstallUpdatesPartition(c *C) {
309 // add a update309 // add a update
310 s.mockSystemImage.info["target_build_number"] = "3.14"310 s.mockSystemImage.info["target_build_number"] = "3.14"
311 parts, err := s.systemImage.GetUpdates()311 parts, err := s.systemImage.Updates()
312312
313 sp := parts[0].(*SystemImagePart)313 sp := parts[0].(*SystemImagePart)
314 mockPartition := MockPartition{}314 mockPartition := MockPartition{}
@@ -322,7 +322,7 @@
322func (s *SITestSuite) TestSystemImagePartInstall(c *C) {322func (s *SITestSuite) TestSystemImagePartInstall(c *C) {
323 // add a update323 // add a update
324 s.mockSystemImage.info["target_build_number"] = "3.14"324 s.mockSystemImage.info["target_build_number"] = "3.14"
325 parts, err := s.systemImage.GetUpdates()325 parts, err := s.systemImage.Updates()
326326
327 sp := parts[0].(*SystemImagePart)327 sp := parts[0].(*SystemImagePart)
328 mockPartition := MockPartition{}328 mockPartition := MockPartition{}

Subscribers

People subscribed via source and target branches