~fgimenez/snappy-cloud-image/list-private-images

« back to all changes in this revision

Viewing changes to source/source_test.go

  • Committer: Federico Gimenez
  • Date: 2015-09-11 07:28:32 UTC
  • mfrom: (63.1.3 remove-branches)
  • Revision ID: fgimenez@canonical.com-20150911072832-9fg7uzrxuxq2bhwg
mergedĀ lp:~fgimenez/snappy-tests-job/remove-branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
        c.Assert(err, check.IsNil, check.Commentf("Unexpected return error %s", err))
112
112
}
113
113
 
 
114
func (s *sourceSuite) TestCleaunUp(c *check.C) {
 
115
        expectedPath := expectedGoPath()
 
116
 
 
117
        s.subject.CleanUp()
 
118
 
 
119
        c.Assert(s.fakeUtil.RemoveAllCalls[expectedPath], check.Equals, 1,
 
120
                check.Commentf("Expected call to remove %s not happened", expectedPath))
 
121
}
 
122
 
 
123
func expectedGoPath() string {
 
124
        return filepath.Join(targetPath, strconv.Itoa(os.Getpid()))
 
125
}
 
126
 
114
127
func expectedBasePath() string {
115
 
        return filepath.Join(targetPath, strconv.Itoa(os.Getpid()), basePkg)
 
128
        return filepath.Join(expectedGoPath(), basePkg)
116
129
}
117
130
 
118
131
func expectedReturnPath() string {