@@ -24,11 +24,13 @@ describe('Dev Containers CLI', function () {
2424 describe ( 'Command set-up' , ( ) => {
2525 it ( 'should succeed and run postAttachCommand from config' , async ( ) => {
2626
27- const containerId = ( await shellExec ( `docker run -d alpine:3.17 sleep inf` ) ) . stdout . trim ( ) ;
27+ const containerId = ( await shellExec ( `docker run -d -e TEST_CE=TEST_VALUE alpine:3.17 sleep inf` ) ) . stdout . trim ( ) ;
2828
29- const res = await shellExec ( `${ cli } set-up --container-id ${ containerId } --config ${ __dirname } /configs/set-up-with-config/devcontainer.json` ) ;
29+ const res = await shellExec ( `${ cli } set-up --container-id ${ containerId } --config ${ __dirname } /configs/set-up-with-config/devcontainer.json --include-configuration --include-merged-configuration ` ) ;
3030 const response = JSON . parse ( res . stdout ) ;
3131 assert . equal ( response . outcome , 'success' ) ;
32+ assert . equal ( response . configuration ?. remoteEnv ?. TEST_RE , 'TEST_VALUE' ) ;
33+ assert . equal ( response . mergedConfiguration ?. remoteEnv ?. TEST_RE , 'TEST_VALUE' ) ;
3234
3335 await shellExec ( `docker exec ${ containerId } test -f /postAttachCommand.txt` ) ;
3436 await shellExec ( `docker rm -f ${ containerId } ` ) ;
@@ -37,11 +39,13 @@ describe('Dev Containers CLI', function () {
3739 it ( 'should succeed and run postCreateCommand from metadata' , async ( ) => {
3840
3941 await shellExec ( `docker build -t devcontainer-set-up-test ${ __dirname } /configs/set-up-with-metadata` ) ;
40- const containerId = ( await shellExec ( `docker run -d devcontainer-set-up-test sleep inf` ) ) . stdout . trim ( ) ;
42+ const containerId = ( await shellExec ( `docker run -d -e TEST_CE=TEST_VALUE2 devcontainer-set-up-test sleep inf` ) ) . stdout . trim ( ) ;
4143
42- const res = await shellExec ( `${ cli } set-up --container-id ${ containerId } ` ) ;
44+ const res = await shellExec ( `${ cli } set-up --container-id ${ containerId } --include-configuration --include-merged-configuration ` ) ;
4345 const response = JSON . parse ( res . stdout ) ;
4446 assert . equal ( response . outcome , 'success' ) ;
47+ assert . equal ( Object . keys ( response . configuration ) . length , 0 ) ;
48+ assert . equal ( response . mergedConfiguration ?. remoteEnv ?. TEST_RE , 'TEST_VALUE2' ) ;
4549
4650 await shellExec ( `docker exec ${ containerId } test -f /postCreateCommand.txt` ) ;
4751 await shellExec ( `docker rm -f ${ containerId } ` ) ;
0 commit comments