mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-25 13:33:41 +00:00
Fix unit tests
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
@@ -19,9 +19,10 @@ package action_test
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
sdkTypes "github.com/kairos-io/kairos-sdk/types"
|
||||
"path/filepath"
|
||||
|
||||
sdkTypes "github.com/kairos-io/kairos-sdk/types"
|
||||
|
||||
agentConfig "github.com/kairos-io/kairos-agent/v2/pkg/config"
|
||||
fsutils "github.com/kairos-io/kairos-agent/v2/pkg/utils/fs"
|
||||
|
||||
@@ -449,8 +450,7 @@ var _ = Describe("Runtime Actions", func() {
|
||||
spec.Active.Size = 10
|
||||
spec.Passive.Size = 10
|
||||
spec.Recovery.Size = 10
|
||||
|
||||
spec.RecoveryUpgrade = true
|
||||
spec.Entry = constants.BootEntryRecovery
|
||||
|
||||
err = fsutils.MkdirAll(config.Fs, "/proc", constants.DirPerm)
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
@@ -542,8 +542,7 @@ var _ = Describe("Runtime Actions", func() {
|
||||
spec.Active.Size = 10
|
||||
spec.Passive.Size = 10
|
||||
spec.Recovery.Size = 10
|
||||
|
||||
spec.RecoveryUpgrade = true
|
||||
spec.Entry = constants.BootEntryRecovery
|
||||
|
||||
err = fsutils.MkdirAll(config.Fs, "/proc", constants.DirPerm)
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
|
@@ -17,11 +17,12 @@ limitations under the License.
|
||||
package v1_test
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/kairos-io/kairos-agent/v2/pkg/constants"
|
||||
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
var _ = Describe("Types", Label("types", "config"), func() {
|
||||
@@ -444,7 +445,7 @@ var _ = Describe("Types", Label("types", "config"), func() {
|
||||
})
|
||||
Describe("Recovery upgrade", func() {
|
||||
BeforeEach(func() {
|
||||
spec.RecoveryUpgrade = true
|
||||
spec.Entry = constants.BootEntryRecovery
|
||||
})
|
||||
It("fails with empty source", func() {
|
||||
err := spec.Sanitize()
|
||||
|
Reference in New Issue
Block a user