Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <itxaka@kairos.io>
  • Loading branch information
Itxaka committed Jan 4, 2024
1 parent 1a122d3 commit ef8000a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/action/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ var _ = Describe("BuildISOAction", func() {
Expect(err).ShouldNot(HaveOccurred())
_, err = fs.Create(filepath.Join(bootDir, "initrd"))
Expect(err).ShouldNot(HaveOccurred())
// Create shim and efi fake files
err = utils.MkdirAll(fs, filepath.Join(bootDir, "efi", "EFI", "fedora"), constants.DirPerm)
Expect(err).ShouldNot(HaveOccurred())
_, err = fs.Create(filepath.Join(bootDir, "efi", "EFI", "fedora", "shim.efi"))
Expect(err).ShouldNot(HaveOccurred())
_, err = fs.Create(filepath.Join(bootDir, "efi", "EFI", "fedora", "grubx64.efi"))
Expect(err).ShouldNot(HaveOccurred())

buildISO := action.NewBuildISOAction(cfg, iso)
err = buildISO.ISORun()
Expand Down Expand Up @@ -179,6 +186,13 @@ var _ = Describe("BuildISOAction", func() {
Expect(err).ShouldNot(HaveOccurred())
_, err = fs.Create(filepath.Join(bootDir, "initrd"))
Expect(err).ShouldNot(HaveOccurred())
// Create shim and efi fake files
err = utils.MkdirAll(fs, filepath.Join(bootDir, "efi", "EFI", "fedora"), constants.DirPerm)
Expect(err).ShouldNot(HaveOccurred())
_, err = fs.Create(filepath.Join(bootDir, "efi", "EFI", "fedora", "shim.efi"))
Expect(err).ShouldNot(HaveOccurred())
_, err = fs.Create(filepath.Join(bootDir, "efi", "EFI", "fedora", "grubx64.efi"))
Expect(err).ShouldNot(HaveOccurred())

runner.SideEffect = func(command string, args ...string) ([]byte, error) {
if command == "xorriso" {
Expand Down

0 comments on commit ef8000a

Please sign in to comment.