Пример #1
0
		logger := boshlog.NewLogger(boshlog.LevelNone)
		releaseExtractor = NewExtractor(fakeFS, compressor, fakeReleaseValidator, logger)
	})

	Describe("Extract", func() {
		var (
			releaseTarballPath string
		)
		BeforeEach(func() {
			releaseTarballPath = "/fake/release.tgz"
			fakeFS.WriteFileString(releaseTarballPath, "fake-tgz-contents")
		})

		Context("when an extracted release directory can be created", func() {
			BeforeEach(func() {
				fakeFS.TempDirDirs = []string{"/extracted-release-path"}
				releaseContents := `---
name: fake-release-name
version: fake-release-version

packages:
- name: fake-release-package-name
  version: fake-release-package-version
  fingerprint: fake-release-package-fingerprint
  sha1: fake-release-package-sha1
  dependencies: []
jobs:
- name: cpi
  version: fake-release-job-version
  fingerprint: fake-release-job-fingerprint
  sha1: fake-release-job-sha1