@@ -33,20 +33,20 @@ describe('bundling', () => {
33
33
// volume Creation
34
34
expect ( spawnSyncStub . calledWith ( DOCKER_CMD , sinon . match ( [
35
35
'volume' , 'create' , sinon . match ( / a s s e t I n p u t .* / g) ,
36
- ] ) , { stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
36
+ ] ) , { encoding : 'utf-8' , stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
37
37
38
38
expect ( spawnSyncStub . calledWith ( DOCKER_CMD , sinon . match ( [
39
39
'volume' , 'create' , sinon . match ( / a s s e t O u t p u t .* / g) ,
40
- ] ) , { stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
40
+ ] ) , { encoding : 'utf-8' , stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
41
41
42
42
// volume removal
43
43
expect ( spawnSyncStub . calledWith ( DOCKER_CMD , sinon . match ( [
44
44
'volume' , 'rm' , sinon . match ( / a s s e t I n p u t .* / g) ,
45
- ] ) , { stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
45
+ ] ) , { encoding : 'utf-8' , stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
46
46
47
47
expect ( spawnSyncStub . calledWith ( DOCKER_CMD , sinon . match ( [
48
48
'volume' , 'rm' , sinon . match ( / a s s e t O u t p u t .* / g) ,
49
- ] ) , { stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
49
+ ] ) , { encoding : 'utf-8' , stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
50
50
51
51
// prepare copy container
52
52
expect ( spawnSyncStub . calledWith ( DOCKER_CMD , sinon . match ( [
@@ -58,29 +58,29 @@ describe('bundling', () => {
58
58
'sh' ,
59
59
'-c' ,
60
60
`mkdir -p ${ AssetStaging . BUNDLING_INPUT_DIR } && chown -R ${ options . user } ${ AssetStaging . BUNDLING_OUTPUT_DIR } && chown -R ${ options . user } ${ AssetStaging . BUNDLING_INPUT_DIR } ` ,
61
- ] ) , { stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
61
+ ] ) , { encoding : 'utf-8' , stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
62
62
63
63
// delete copy container
64
64
expect ( spawnSyncStub . calledWith ( DOCKER_CMD , sinon . match ( [
65
65
'rm' , sinon . match ( / c o p y C o n t a i n e r .* / g) ,
66
- ] ) , { stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
66
+ ] ) , { encoding : 'utf-8' , stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
67
67
68
68
// copy files to copy container
69
69
expect ( spawnSyncStub . calledWith ( DOCKER_CMD , sinon . match ( [
70
70
'cp' , `${ options . sourcePath } /.` , `${ helper . copyContainerName } :${ AssetStaging . BUNDLING_INPUT_DIR } ` ,
71
- ] ) , { stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
71
+ ] ) , { encoding : 'utf-8' , stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
72
72
73
73
// copy files from copy container to host
74
74
expect ( spawnSyncStub . calledWith ( DOCKER_CMD , sinon . match ( [
75
75
'cp' , `${ helper . copyContainerName } :${ AssetStaging . BUNDLING_OUTPUT_DIR } /.` , options . bundleDir ,
76
- ] ) , { stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
76
+ ] ) , { encoding : 'utf-8' , stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
77
77
78
78
// actual docker run
79
79
expect ( spawnSyncStub . calledWith ( DOCKER_CMD , sinon . match . array . contains ( [
80
80
'run' , '--rm' ,
81
81
'--volumes-from' , helper . copyContainerName ,
82
82
'alpine' ,
83
- ] ) , { stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
83
+ ] ) , { encoding : 'utf-8' , stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
84
84
85
85
} ) ;
86
86
@@ -109,6 +109,6 @@ describe('bundling', () => {
109
109
'run' , '--rm' ,
110
110
'-v' ,
111
111
'alpine' ,
112
- ] ) , { stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
112
+ ] ) , { encoding : 'utf-8' , stdio : [ 'ignore' , process . stderr , 'inherit' ] } ) ) . toEqual ( true ) ;
113
113
} ) ;
114
114
} ) ;
0 commit comments