UKI improvements (#186)

This commit is contained in:
Itxaka
2023-12-18 16:09:55 +01:00
committed by GitHub
parent 3254b8a36e
commit b8232ae985
7 changed files with 99 additions and 11 deletions

View File

@@ -17,6 +17,7 @@ package config_test
import (
"fmt"
"github.com/kairos-io/kairos-sdk/collector"
"path/filepath"
"reflect"
"strings"
@@ -169,6 +170,11 @@ var _ = Describe("Schema", func() {
AfterEach(func() {
cleanup()
})
It("Scan can override options", func() {
c, err := Scan(collector.Readers(strings.NewReader(`uki-max-entries: 34`)), collector.NoLogs)
Expect(err).ShouldNot(HaveOccurred())
Expect(c.UkiMaxEntries).To(Equal(34))
})
It("Writes and loads an installation data", func() {
err = config.WriteInstallState(installState, statePath, recoveryPath)
Expect(err).ShouldNot(HaveOccurred())