func buildPackageApplier() (
	*fakebc.FakeBundleCollection,
	*fakeblob.FakeBlobstore,
	*fakedisk.FakeCompressor,
	PackageApplier,
) {
	packagesBc := fakebc.NewFakeBundleCollection()
	blobstore := fakeblob.NewFakeBlobstore()
	compressor := fakedisk.NewFakeCompressor()
	applier := NewConcretePackageApplier(packagesBc, blobstore, compressor)
	return packagesBc, blobstore, compressor, applier
}
func buildJobApplier() (
	*fakebc.FakeBundleCollection,
	*fakeblob.FakeBlobstore,
	*fakedisk.FakeCompressor,
	JobApplier,
) {
	jobsBc := fakebc.NewFakeBundleCollection()
	blobstore := fakeblob.NewFakeBlobstore()
	compressor := fakedisk.NewFakeCompressor()
	applier := NewRenderedJobApplier(jobsBc, blobstore, compressor)
	return jobsBc, blobstore, compressor, applier
}
示例#3
0
func getUbuntuDependencies() (
	collector *fakestats.FakeStatsCollector,
	fs *fakesys.FakeFileSystem,
	cmdRunner *fakesys.FakeCmdRunner,
	fakeDiskManager fakedisk.FakeDiskManager,
	fakeCompressor *fakedisk.FakeCompressor,
) {
	collector = &fakestats.FakeStatsCollector{}
	fs = &fakesys.FakeFileSystem{}
	cmdRunner = &fakesys.FakeCmdRunner{}
	fakeDiskManager = fakedisk.NewFakeDiskManager(cmdRunner)
	fakeCompressor = fakedisk.NewFakeCompressor()
	return
}
示例#4
0
func buildLogsAction() (*fakedisk.FakeCompressor, *fakeblobstore.FakeBlobstore, logsAction) {
	compressor := fakedisk.NewFakeCompressor()
	blobstore := &fakeblobstore.FakeBlobstore{}
	action := newLogs(compressor, blobstore)
	return compressor, blobstore, action
}