mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-09-17 15:52:12 +00:00
art: Move from io/ioutil to io and os packages (#470)
refactor: move from io/ioutil to io and os packages The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. [1]: https://golang.org/doc/go1.16#ioutil Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package bundles_test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
@@ -13,7 +12,7 @@ import (
|
||||
var _ = Describe("Bundle", func() {
|
||||
Context("install", func() {
|
||||
PIt("installs packages from luet repos", func() {
|
||||
dir, err := ioutil.TempDir("", "test")
|
||||
dir, err := os.MkdirTemp("", "test")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
defer os.RemoveAll(dir)
|
||||
os.MkdirAll(filepath.Join(dir, "var", "tmp", "luet"), os.ModePerm)
|
||||
@@ -23,7 +22,7 @@ var _ = Describe("Bundle", func() {
|
||||
})
|
||||
|
||||
It("installs from container images", func() {
|
||||
dir, err := ioutil.TempDir("", "test")
|
||||
dir, err := os.MkdirTemp("", "test")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
defer os.RemoveAll(dir)
|
||||
err = RunBundles([]BundleOption{WithDBPath(dir), WithRootFS(dir), WithTarget("container://quay.io/mocaccino/extra:edgevpn-utils-0.15.0")})
|
||||
|
Reference in New Issue
Block a user