Adapt fixtures and tests

This commit is contained in:
Ettore Di Giacinto
2020-12-12 12:10:24 +01:00
parent 95da20e366
commit d97e606a31
11 changed files with 22 additions and 22 deletions

View File

@@ -50,8 +50,8 @@ var _ = Describe("Compiler", func() {
Expect(err).ToNot(HaveOccurred()) Expect(err).ToNot(HaveOccurred())
defer os.RemoveAll(tmpdir) // clean up defer os.RemoveAll(tmpdir) // clean up
Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "chmod +x generate.sh", "./generate.sh"}))
Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x generate.sh"})) Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2"}))
spec.SetOutputPath(tmpdir) spec.SetOutputPath(tmpdir)
compiler.SetConcurrency(2) compiler.SetConcurrency(2)

View File

@@ -60,8 +60,8 @@ var _ = Describe("Installer", func() {
Expect(err).ToNot(HaveOccurred()) Expect(err).ToNot(HaveOccurred())
defer os.RemoveAll(tmpdir) // clean up defer os.RemoveAll(tmpdir) // clean up
Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "chmod +x generate.sh", "./generate.sh"}))
Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x generate.sh"})) Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2"}))
spec.SetOutputPath(tmpdir) spec.SetOutputPath(tmpdir)
c.SetConcurrency(2) c.SetConcurrency(2)
@@ -176,8 +176,8 @@ urls:
Expect(err).ToNot(HaveOccurred()) Expect(err).ToNot(HaveOccurred())
defer os.RemoveAll(tmpdir) // clean up defer os.RemoveAll(tmpdir) // clean up
Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "chmod +x generate.sh", "./generate.sh"}))
Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x generate.sh"})) Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2"}))
spec.SetOutputPath(tmpdir) spec.SetOutputPath(tmpdir)
c.SetConcurrency(2) c.SetConcurrency(2)
@@ -294,8 +294,8 @@ urls:
Expect(err).ToNot(HaveOccurred()) Expect(err).ToNot(HaveOccurred())
defer os.RemoveAll(tmpdir) // clean up defer os.RemoveAll(tmpdir) // clean up
Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "chmod +x generate.sh", "./generate.sh"}))
Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x generate.sh"})) Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2"}))
spec.SetOutputPath(tmpdir) spec.SetOutputPath(tmpdir)
c.SetConcurrency(2) c.SetConcurrency(2)
@@ -412,8 +412,8 @@ urls:
Expect(err).ToNot(HaveOccurred()) Expect(err).ToNot(HaveOccurred())
defer os.RemoveAll(tmpdir) // clean up defer os.RemoveAll(tmpdir) // clean up
Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "chmod +x generate.sh", "./generate.sh"}))
Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x generate.sh"})) Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2"}))
spec.SetOutputPath(tmpdir) spec.SetOutputPath(tmpdir)
c.SetConcurrency(2) c.SetConcurrency(2)

View File

@@ -60,8 +60,8 @@ var _ = Describe("Repository", func() {
Expect(err).ToNot(HaveOccurred()) Expect(err).ToNot(HaveOccurred())
defer os.RemoveAll(tmpdir) // clean up defer os.RemoveAll(tmpdir) // clean up
Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "chmod +x generate.sh", "./generate.sh"}))
Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x generate.sh"})) Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2"}))
spec.SetOutputPath(tmpdir) spec.SetOutputPath(tmpdir)
compiler.SetConcurrency(1) compiler.SetConcurrency(1)
@@ -133,8 +133,8 @@ var _ = Describe("Repository", func() {
Expect(err).ToNot(HaveOccurred()) Expect(err).ToNot(HaveOccurred())
defer os.RemoveAll(tmpdir) // clean up defer os.RemoveAll(tmpdir) // clean up
Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "chmod +x generate.sh", "./generate.sh"}))
Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x generate.sh"})) Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2"}))
spec.SetOutputPath(tmpdir) spec.SetOutputPath(tmpdir)
spec2.SetOutputPath(tmpdir) spec2.SetOutputPath(tmpdir)

View File

@@ -1,10 +1,10 @@
image: "alpine" image: "alpine"
prelude: prelude:
- mkdir /foo - mkdir /foo
- chmod +x generate.sh
steps: steps:
- echo artifact5 > /foo/test5 - echo artifact5 > /foo/test5
- echo artifact6 > /foo/test6 - echo artifact6 > /foo/test6
- chmod +x generate.sh
- ./generate.sh - ./generate.sh
package_dir: /foo package_dir: /foo
includes: includes:

View File

@@ -2,8 +2,8 @@ image: "alpine"
prelude: prelude:
- echo foo > /test - echo foo > /test
- echo bar > /test2 - echo bar > /test2
- chmod +x generate.sh
steps: steps:
- echo artifact5 > /newc - echo artifact5 > /newc
- echo artifact6 > /newnewc - echo artifact6 > /newnewc
- chmod +x generate.sh
- ./generate.sh - ./generate.sh

View File

@@ -2,8 +2,8 @@ image: "alpine"
prelude: prelude:
- echo foo > /test - echo foo > /test
- echo bar > /test2 - echo bar > /test2
- chmod +x generate.sh
steps: steps:
- echo artifact5 > /test5 - echo artifact5 > /test5
- echo artifact6 > /test6 - echo artifact6 > /test6
- chmod +x generate.sh
- ./generate.sh - ./generate.sh

View File

@@ -2,8 +2,8 @@ image: "alpine"
prelude: prelude:
- echo foo > /test - echo foo > /test
- echo bar > /test2 - echo bar > /test2
- chmod +x generate.sh
steps: steps:
- echo artifact5 > /newc - echo artifact5 > /newc
- echo artifact6 > /newnewc - echo artifact6 > /newnewc
- chmod +x generate.sh
- ./generate.sh - ./generate.sh

View File

@@ -2,8 +2,8 @@ image: "alpine"
prelude: prelude:
- echo foo > /test - echo foo > /test
- echo bar > /test2 - echo bar > /test2
- chmod +x generate.sh
steps: steps:
- echo artifact5 > /test5 - echo artifact5 > /test5
- echo artifact6 > /test6 - echo artifact6 > /test6
- chmod +x generate.sh
- ./generate.sh - ./generate.sh

View File

@@ -2,8 +2,8 @@ image: "alpine"
prelude: prelude:
- echo foo > /test - echo foo > /test
- echo bar > /test2 - echo bar > /test2
- chmod +x generate.sh
steps: steps:
- echo artifact5 > /newc - echo artifact5 > /newc
- echo artifact6 > /newnewc - echo artifact6 > /newnewc
- chmod +x generate.sh
- ./generate.sh - ./generate.sh

View File

@@ -2,8 +2,8 @@ image: "alpine"
prelude: prelude:
- echo foo > /test - echo foo > /test
- echo bar > /test2 - echo bar > /test2
- chmod +x generate.sh
steps: steps:
- echo artifact5 > /test5 - echo artifact5 > /test5
- echo artifact6 > /test6 - echo artifact6 > /test6
- chmod +x generate.sh
- ./generate.sh - ./generate.sh

View File

@@ -2,8 +2,8 @@ image: "alpine"
prelude: prelude:
- echo foo > /test - echo foo > /test
- echo bar > /test2 - echo bar > /test2
- chmod +x generate.sh
steps: steps:
- echo artifact5 > /newc - echo artifact5 > /newc
- echo artifact6 > /newnewc - echo artifact6 > /newnewc
- chmod +x generate.sh
- ./generate.sh - ./generate.sh