Skip to content

Commit

Permalink
refine the deprecated package
Browse files Browse the repository at this point in the history
Signed-off-by: terry.hung <terryhung1228@gmail.com>
  • Loading branch information
Terryhung committed Oct 31, 2024
1 parent 8b4ead3 commit 1781a1b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions flytectl/pkg/configutil/configutil_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package configutil

import (
"io"
"io/ioutil"
"os"
"testing"
Expand All @@ -20,7 +21,7 @@ func TestSetupConfig(t *testing.T) {
}
err = SetupConfig(file.Name(), AdminConfigTemplate, templateValue)
assert.NoError(t, err)
configBytes, err := ioutil.ReadAll(file)
configBytes, err := io.ReadAll(file)
assert.NoError(t, err)
expected := `admin:
# For GRPC endpoints you might want to use dns:///flyte.myexample.com
Expand Down Expand Up @@ -62,7 +63,7 @@ console:
}
err = SetupConfig(file.Name(), AdminConfigTemplate, templateValue)
assert.NoError(t, err)
configBytes, err = ioutil.ReadAll(file)
configBytes, err = io.ReadAll(file)
assert.NoError(t, err)
expected = `admin:
# For GRPC endpoints you might want to use dns:///flyte.myexample.com
Expand All @@ -82,8 +83,8 @@ func TestConfigCleanup(t *testing.T) {
if os.IsNotExist(err) {
_ = os.MkdirAll(f.FilePathJoin(f.UserHomeDir(), ".flyte"), 0755)
}
_ = ioutil.WriteFile(FlytectlConfig, []byte("string"), 0600)
_ = ioutil.WriteFile(Kubeconfig, []byte("string"), 0600)
_ = os.WriteFile(FlytectlConfig, []byte("string"), 0600)
_ = os.WriteFile(Kubeconfig, []byte("string"), 0600)

err = ConfigCleanup()
assert.Nil(t, err)
Expand Down

0 comments on commit 1781a1b

Please sign in to comment.