File tree 3 files changed +6
-7
lines changed
3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
package skeletor
2
2
3
3
import (
4
- "io/ioutil "
4
+ "os "
5
5
"testing"
6
6
7
7
"get.porter.sh/porter/pkg/exec/builder"
@@ -12,7 +12,7 @@ import (
12
12
)
13
13
14
14
func TestMixin_UnmarshalStep (t * testing.T ) {
15
- b , err := ioutil .ReadFile ("testdata/step-input.yaml" )
15
+ b , err := os .ReadFile ("testdata/step-input.yaml" )
16
16
require .NoError (t , err )
17
17
18
18
var action Action
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package skeletor
3
3
import (
4
4
"bytes"
5
5
"context"
6
- "io/ioutil"
7
6
"os"
8
7
"path"
9
8
"testing"
@@ -36,7 +35,7 @@ func TestMixin_Execute(t *testing.T) {
36
35
m := NewTestMixin (t )
37
36
38
37
m .Setenv (test .ExpectedCommandEnv , tc .wantCommand )
39
- mixinInputB , err := ioutil .ReadFile (tc .file )
38
+ mixinInputB , err := os .ReadFile (tc .file )
40
39
require .NoError (t , err )
41
40
42
41
m .In = bytes .NewBuffer (mixinInputB )
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package skeletor
2
2
3
3
import (
4
4
"fmt"
5
- "io/ioutil "
5
+ "os "
6
6
"testing"
7
7
8
8
"github.com/ghodss/yaml" // We are not using go-yaml because of serialization problems with jsonschema, don't use this library elsewhere
@@ -17,7 +17,7 @@ func TestMixin_PrintSchema(t *testing.T) {
17
17
m .PrintSchema ()
18
18
gotSchema := m .TestContext .GetOutput ()
19
19
20
- wantSchema , err := ioutil .ReadFile ("schema/schema.json" )
20
+ wantSchema , err := os .ReadFile ("schema/schema.json" )
21
21
require .NoError (t , err )
22
22
23
23
assert .Equal (t , string (wantSchema ), gotSchema )
@@ -41,7 +41,7 @@ func TestMixin_ValidateSchema(t *testing.T) {
41
41
for _ , tc := range testcases {
42
42
t .Run (tc .name , func (t * testing.T ) {
43
43
// Read the mixin input as a go dump
44
- mixinInputB , err := ioutil .ReadFile (tc .file )
44
+ mixinInputB , err := os .ReadFile (tc .file )
45
45
require .NoError (t , err )
46
46
mixinInputMap := make (map [string ]interface {})
47
47
err = yaml .Unmarshal (mixinInputB , & mixinInputMap )
You can’t perform that action at this time.
0 commit comments