From d97e606a311b5157976795d4b167afcbf8ad399d Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sat, 12 Dec 2020 12:10:24 +0100 Subject: [PATCH] Adapt fixtures and tests --- pkg/compiler/compiler_test.go | 4 ++-- pkg/installer/installer_test.go | 16 ++++++++-------- pkg/installer/repository_test.go | 8 ++++---- .../package_dir/dironly_filter/build.yaml | 2 +- tests/fixtures/upgrade/cat/b-1.1/build.yaml | 2 +- tests/fixtures/upgrade/cat/b/build.yaml | 2 +- .../upgrade_integration/cat/b-1.1/build.yaml | 2 +- .../upgrade_integration/cat/b/build.yaml | 2 +- .../upgrade_new_repo/cat/b-1.1/build.yaml | 2 +- tests/fixtures/upgrade_old_repo/cat/b/build.yaml | 2 +- .../cat/b-1.1/build.yaml | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pkg/compiler/compiler_test.go b/pkg/compiler/compiler_test.go index a205be6f..82befbd1 100644 --- a/pkg/compiler/compiler_test.go +++ b/pkg/compiler/compiler_test.go @@ -50,8 +50,8 @@ var _ = Describe("Compiler", func() { Expect(err).ToNot(HaveOccurred()) defer os.RemoveAll(tmpdir) // clean up - Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) - Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x 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"})) spec.SetOutputPath(tmpdir) compiler.SetConcurrency(2) diff --git a/pkg/installer/installer_test.go b/pkg/installer/installer_test.go index de703565..72628af1 100644 --- a/pkg/installer/installer_test.go +++ b/pkg/installer/installer_test.go @@ -60,8 +60,8 @@ var _ = Describe("Installer", func() { Expect(err).ToNot(HaveOccurred()) defer os.RemoveAll(tmpdir) // clean up - Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) - Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x 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"})) spec.SetOutputPath(tmpdir) c.SetConcurrency(2) @@ -176,8 +176,8 @@ urls: Expect(err).ToNot(HaveOccurred()) defer os.RemoveAll(tmpdir) // clean up - Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) - Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x 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"})) spec.SetOutputPath(tmpdir) c.SetConcurrency(2) @@ -294,8 +294,8 @@ urls: Expect(err).ToNot(HaveOccurred()) defer os.RemoveAll(tmpdir) // clean up - Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) - Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x 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"})) spec.SetOutputPath(tmpdir) c.SetConcurrency(2) @@ -412,8 +412,8 @@ urls: Expect(err).ToNot(HaveOccurred()) defer os.RemoveAll(tmpdir) // clean up - Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) - Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x 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"})) spec.SetOutputPath(tmpdir) c.SetConcurrency(2) diff --git a/pkg/installer/repository_test.go b/pkg/installer/repository_test.go index e053ebdb..bbed952f 100644 --- a/pkg/installer/repository_test.go +++ b/pkg/installer/repository_test.go @@ -60,8 +60,8 @@ var _ = Describe("Repository", func() { Expect(err).ToNot(HaveOccurred()) defer os.RemoveAll(tmpdir) // clean up - Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) - Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x 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"})) spec.SetOutputPath(tmpdir) compiler.SetConcurrency(1) @@ -133,8 +133,8 @@ var _ = Describe("Repository", func() { Expect(err).ToNot(HaveOccurred()) defer os.RemoveAll(tmpdir) // clean up - Expect(spec.BuildSteps()).To(Equal([]string{"echo artifact5 > /test5", "echo artifact6 > /test6", "./generate.sh"})) - Expect(spec.GetPreBuildSteps()).To(Equal([]string{"echo foo > /test", "echo bar > /test2", "chmod +x 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"})) spec.SetOutputPath(tmpdir) spec2.SetOutputPath(tmpdir) diff --git a/tests/fixtures/package_dir/dironly_filter/build.yaml b/tests/fixtures/package_dir/dironly_filter/build.yaml index 9d4befa7..c739c17e 100644 --- a/tests/fixtures/package_dir/dironly_filter/build.yaml +++ b/tests/fixtures/package_dir/dironly_filter/build.yaml @@ -1,10 +1,10 @@ image: "alpine" prelude: - mkdir /foo - - chmod +x generate.sh steps: - echo artifact5 > /foo/test5 - echo artifact6 > /foo/test6 + - chmod +x generate.sh - ./generate.sh package_dir: /foo includes: diff --git a/tests/fixtures/upgrade/cat/b-1.1/build.yaml b/tests/fixtures/upgrade/cat/b-1.1/build.yaml index 3e3f98a4..d906104d 100644 --- a/tests/fixtures/upgrade/cat/b-1.1/build.yaml +++ b/tests/fixtures/upgrade/cat/b-1.1/build.yaml @@ -2,8 +2,8 @@ image: "alpine" prelude: - echo foo > /test - echo bar > /test2 - - chmod +x generate.sh steps: - echo artifact5 > /newc - echo artifact6 > /newnewc + - chmod +x generate.sh - ./generate.sh diff --git a/tests/fixtures/upgrade/cat/b/build.yaml b/tests/fixtures/upgrade/cat/b/build.yaml index 05a81578..7edb9842 100644 --- a/tests/fixtures/upgrade/cat/b/build.yaml +++ b/tests/fixtures/upgrade/cat/b/build.yaml @@ -2,8 +2,8 @@ image: "alpine" prelude: - echo foo > /test - echo bar > /test2 - - chmod +x generate.sh steps: - echo artifact5 > /test5 - echo artifact6 > /test6 + - chmod +x generate.sh - ./generate.sh \ No newline at end of file diff --git a/tests/fixtures/upgrade_integration/cat/b-1.1/build.yaml b/tests/fixtures/upgrade_integration/cat/b-1.1/build.yaml index 3e3f98a4..d906104d 100644 --- a/tests/fixtures/upgrade_integration/cat/b-1.1/build.yaml +++ b/tests/fixtures/upgrade_integration/cat/b-1.1/build.yaml @@ -2,8 +2,8 @@ image: "alpine" prelude: - echo foo > /test - echo bar > /test2 - - chmod +x generate.sh steps: - echo artifact5 > /newc - echo artifact6 > /newnewc + - chmod +x generate.sh - ./generate.sh diff --git a/tests/fixtures/upgrade_integration/cat/b/build.yaml b/tests/fixtures/upgrade_integration/cat/b/build.yaml index 05a81578..7edb9842 100644 --- a/tests/fixtures/upgrade_integration/cat/b/build.yaml +++ b/tests/fixtures/upgrade_integration/cat/b/build.yaml @@ -2,8 +2,8 @@ image: "alpine" prelude: - echo foo > /test - echo bar > /test2 - - chmod +x generate.sh steps: - echo artifact5 > /test5 - echo artifact6 > /test6 + - chmod +x generate.sh - ./generate.sh \ No newline at end of file diff --git a/tests/fixtures/upgrade_new_repo/cat/b-1.1/build.yaml b/tests/fixtures/upgrade_new_repo/cat/b-1.1/build.yaml index 3e3f98a4..d906104d 100644 --- a/tests/fixtures/upgrade_new_repo/cat/b-1.1/build.yaml +++ b/tests/fixtures/upgrade_new_repo/cat/b-1.1/build.yaml @@ -2,8 +2,8 @@ image: "alpine" prelude: - echo foo > /test - echo bar > /test2 - - chmod +x generate.sh steps: - echo artifact5 > /newc - echo artifact6 > /newnewc + - chmod +x generate.sh - ./generate.sh diff --git a/tests/fixtures/upgrade_old_repo/cat/b/build.yaml b/tests/fixtures/upgrade_old_repo/cat/b/build.yaml index 05a81578..7edb9842 100644 --- a/tests/fixtures/upgrade_old_repo/cat/b/build.yaml +++ b/tests/fixtures/upgrade_old_repo/cat/b/build.yaml @@ -2,8 +2,8 @@ image: "alpine" prelude: - echo foo > /test - echo bar > /test2 - - chmod +x generate.sh steps: - echo artifact5 > /test5 - echo artifact6 > /test6 + - chmod +x generate.sh - ./generate.sh \ No newline at end of file diff --git a/tests/fixtures/upgrade_old_repo_revision/cat/b-1.1/build.yaml b/tests/fixtures/upgrade_old_repo_revision/cat/b-1.1/build.yaml index 3e3f98a4..d906104d 100644 --- a/tests/fixtures/upgrade_old_repo_revision/cat/b-1.1/build.yaml +++ b/tests/fixtures/upgrade_old_repo_revision/cat/b-1.1/build.yaml @@ -2,8 +2,8 @@ image: "alpine" prelude: - echo foo > /test - echo bar > /test2 - - chmod +x generate.sh steps: - echo artifact5 > /newc - echo artifact6 > /newnewc + - chmod +x generate.sh - ./generate.sh