diff --git a/pkg/compiler/types/artifact/artifact_suite_test.go b/pkg/compiler/types/artifact/artifact_suite_test.go new file mode 100644 index 00000000..1d798e7c --- /dev/null +++ b/pkg/compiler/types/artifact/artifact_suite_test.go @@ -0,0 +1,32 @@ +// Copyright © 2019 Ettore Di Giacinto +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, see . + +package artifact_test + +import ( + "testing" + + . "github.com/mudler/luet/cmd" + config "github.com/mudler/luet/pkg/config" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestArtifact(t *testing.T) { + RegisterFailHandler(Fail) + LoadConfig(config.LuetCfg) + RunSpecs(t, "Artifact Suite") +} diff --git a/pkg/compiler/types/artifact/artifact_test.go b/pkg/compiler/types/artifact/artifact_test.go index 2b846763..bad41472 100644 --- a/pkg/compiler/types/artifact/artifact_test.go +++ b/pkg/compiler/types/artifact/artifact_test.go @@ -41,7 +41,7 @@ var _ = Describe("Artifact", func() { generalRecipe := tree.NewGeneralRecipe(pkg.NewInMemoryDatabase(false)) - err := generalRecipe.Load("../../tests/fixtures/buildtree") + err := generalRecipe.Load("../../../../tests/fixtures/buildtree") Expect(err).ToNot(HaveOccurred()) Expect(len(generalRecipe.GetDatabase().GetPackages())).To(Equal(1)) diff --git a/pkg/compiler/types/artifact/checksum_test.go b/pkg/compiler/types/artifact/checksum_test.go index 8895ad7b..2219452d 100644 --- a/pkg/compiler/types/artifact/checksum_test.go +++ b/pkg/compiler/types/artifact/checksum_test.go @@ -40,13 +40,13 @@ var _ = Describe("Checksum", func() { Expect(len(definitionsum)).To(Equal(0)) Expect(len(definitionsum2)).To(Equal(0)) - err = buildsum.Generate(NewPackageArtifact("../../tests/fixtures/layers/alpine/build.yaml")) + err = buildsum.Generate(NewPackageArtifact("../../../../tests/fixtures/layers/alpine/build.yaml")) Expect(err).ToNot(HaveOccurred()) - err = definitionsum.Generate(NewPackageArtifact("../../tests/fixtures/layers/alpine/definition.yaml")) + err = definitionsum.Generate(NewPackageArtifact("../../../../tests/fixtures/layers/alpine/definition.yaml")) Expect(err).ToNot(HaveOccurred()) - err = definitionsum2.Generate(NewPackageArtifact("../../tests/fixtures/layers/alpine/definition.yaml")) + err = definitionsum2.Generate(NewPackageArtifact("../../../../tests/fixtures/layers/alpine/definition.yaml")) Expect(err).ToNot(HaveOccurred()) Expect(len(buildsum)).To(Equal(1)) diff --git a/pkg/compiler/types/spec/spec_suite_test.go b/pkg/compiler/types/spec/spec_suite_test.go new file mode 100644 index 00000000..aba21a16 --- /dev/null +++ b/pkg/compiler/types/spec/spec_suite_test.go @@ -0,0 +1,32 @@ +// Copyright © 2019 Ettore Di Giacinto +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, see . + +package compilerspec_test + +import ( + "testing" + + . "github.com/mudler/luet/cmd" + config "github.com/mudler/luet/pkg/config" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestSpec(t *testing.T) { + RegisterFailHandler(Fail) + LoadConfig(config.LuetCfg) + RunSpecs(t, "Spec Suite") +} diff --git a/pkg/compiler/types/spec/spec_test.go b/pkg/compiler/types/spec/spec_test.go index 7b54dd1d..2b5588ad 100644 --- a/pkg/compiler/types/spec/spec_test.go +++ b/pkg/compiler/types/spec/spec_test.go @@ -78,7 +78,7 @@ var _ = Describe("Spec", func() { It("Loads it correctly", func() { generalRecipe := tree.NewGeneralRecipe(pkg.NewInMemoryDatabase(false)) - err := generalRecipe.Load("../../tests/fixtures/buildtree") + err := generalRecipe.Load("../../../../tests/fixtures/buildtree") Expect(err).ToNot(HaveOccurred()) Expect(len(generalRecipe.GetDatabase().GetPackages())).To(Equal(1)) @@ -130,7 +130,7 @@ RUN echo bar > /test2`)) It("Renders retrieve and env fields", func() { generalRecipe := tree.NewGeneralRecipe(pkg.NewInMemoryDatabase(false)) - err := generalRecipe.Load("../../tests/fixtures/retrieve") + err := generalRecipe.Load("../../../../tests/fixtures/retrieve") Expect(err).ToNot(HaveOccurred()) Expect(len(generalRecipe.GetDatabase().GetPackages())).To(Equal(1))