Skip to content

Commit

Permalink
Make sure to read artifact data in installation tests.
Browse files Browse the repository at this point in the history
For the install tests to pass we need to read the artifact
data part in order to correctly calculate the payload
checksum.

Changelog: None

Signed-off-by: Marcin Pasinski <[email protected]>
(cherry picked from commit f2bd9ea)
  • Loading branch information
pasinskim authored and kacf committed Sep 27, 2017
1 parent 06e5813 commit f701559
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions installer/installer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,12 @@ func TestInstallNoSignature(t *testing.T) {

type fDevice struct{}

func (d *fDevice) InstallUpdate(io.ReadCloser, int64) error { return nil }
func (d *fDevice) EnableUpdatedPartition() error { return nil }
func (d *fDevice) InstallUpdate(r io.ReadCloser, l int64) error {
_, err := io.Copy(ioutil.Discard, r)
return err
}

func (d *fDevice) EnableUpdatedPartition() error { return nil }

const (
PublicRSAKey = `-----BEGIN PUBLIC KEY-----
Expand Down

0 comments on commit f701559

Please sign in to comment.