@@ -23,7 +23,7 @@ describe('Blueprint E2E Tests', () => {
2323 let blueprintId : string ;
2424
2525 it ( 'should create a blueprint' , async ( ) => {
26- const { stdout } = await execAsync ( 'node dist/cli.js blueprint create test-blueprint --dockerfile "FROM ubuntu:20.04" --system-setup-commands "apt update" --resources SMALL' ) ;
26+ const { stdout } = await execAsync ( 'node dist/cli.js blueprint create test-blueprint --dockerfile "FROM ubuntu:20.04" --system-setup-commands "apt update" --resources SMALL --output json ' ) ;
2727
2828 // Extract blueprint ID from output
2929 const match = stdout . match ( / " i d " : \s * " ( [ ^ " ] + ) " / ) ;
@@ -35,22 +35,22 @@ describe('Blueprint E2E Tests', () => {
3535 it ( 'should get blueprint details' , async ( ) => {
3636 expect ( blueprintId ) . toBeDefined ( ) ;
3737
38- const { stdout } = await execAsync ( `node dist/cli.js blueprint get ${ blueprintId } ` ) ;
38+ const { stdout } = await execAsync ( `node dist/cli.js blueprint get ${ blueprintId } --output json ` ) ;
3939
40- expect ( stdout ) . toContain ( 'blueprint= ' ) ;
40+ expect ( stdout ) . toContain ( '"id": ' ) ;
4141 expect ( stdout ) . toContain ( blueprintId ) ;
4242 } , 30000 ) ;
4343
4444 it ( 'should list blueprints' , async ( ) => {
45- const { stdout } = await execAsync ( 'node dist/cli.js blueprint list' ) ;
45+ const { stdout } = await execAsync ( 'node dist/cli.js blueprint list --output json ' ) ;
4646
47- expect ( stdout ) . toContain ( 'blueprint= ' ) ;
47+ expect ( stdout ) . toContain ( '"id": ' ) ;
4848 } , 30000 ) ;
4949
5050 it ( 'should preview blueprint' , async ( ) => {
51- const { stdout } = await execAsync ( 'node dist/cli.js blueprint preview test-blueprint-preview --dockerfile "FROM ubuntu:20.04" --resources SMALL' ) ;
51+ const { stdout } = await execAsync ( 'node dist/cli.js blueprint preview test-blueprint-preview --dockerfile "FROM ubuntu:20.04" --resources SMALL --output json ' ) ;
5252
53- expect ( stdout ) . toContain ( 'preview= ' ) ;
53+ expect ( stdout ) . toContain ( '"dockerfile": ' ) ;
5454 } , 30000 ) ;
5555 } ) ;
5656
@@ -82,7 +82,7 @@ describe('Blueprint E2E Tests', () => {
8282 } ) ;
8383
8484 it ( 'should create blueprint with dockerfile file' , async ( ) => {
85- const { stdout } = await execAsync ( `node dist/cli.js blueprint create test-blueprint-file --dockerfile-path ${ dockerfilePath } --resources SMALL` ) ;
85+ const { stdout } = await execAsync ( `node dist/cli.js blueprint create test-blueprint-file --dockerfile-path ${ dockerfilePath } --resources SMALL --output json ` ) ;
8686
8787 // Extract blueprint ID from output
8888 const match = stdout . match ( / " i d " : \s * " ( [ ^ " ] + ) " / ) ;
@@ -96,7 +96,7 @@ describe('Blueprint E2E Tests', () => {
9696 let blueprintId : string ;
9797
9898 it ( 'should create blueprint with root user' , async ( ) => {
99- const { stdout } = await execAsync ( 'node dist/cli.js blueprint create test-blueprint-root --dockerfile "FROM ubuntu:20.04" --root --resources SMALL' ) ;
99+ const { stdout } = await execAsync ( 'node dist/cli.js blueprint create test-blueprint-root --dockerfile "FROM ubuntu:20.04" --root --resources SMALL --output json ' ) ;
100100
101101 // Extract blueprint ID from output
102102 const match = stdout . match ( / " i d " : \s * " ( [ ^ " ] + ) " / ) ;
@@ -106,7 +106,7 @@ describe('Blueprint E2E Tests', () => {
106106 } , 60000 ) ;
107107
108108 it ( 'should create blueprint with custom user' , async ( ) => {
109- const { stdout } = await execAsync ( 'node dist/cli.js blueprint create test-blueprint-user --dockerfile "FROM ubuntu:20.04" --user testuser:1000 --resources SMALL' ) ;
109+ const { stdout } = await execAsync ( 'node dist/cli.js blueprint create test-blueprint-user --dockerfile "FROM ubuntu:20.04" --user testuser:1000 --resources SMALL --output json ' ) ;
110110
111111 // Extract blueprint ID from output
112112 const match = stdout . match ( / " i d " : \s * " ( [ ^ " ] + ) " / ) ;
@@ -119,7 +119,7 @@ describe('Blueprint E2E Tests', () => {
119119 let blueprintId : string ;
120120
121121 it ( 'should create blueprint with architecture and ports' , async ( ) => {
122- const { stdout } = await execAsync ( 'node dist/cli.js blueprint create test-blueprint-advanced --dockerfile "FROM ubuntu:20.04" --architecture arm64 --available-ports 3000,8080 --resources MEDIUM' ) ;
122+ const { stdout } = await execAsync ( 'node dist/cli.js blueprint create test-blueprint-advanced --dockerfile "FROM ubuntu:20.04" --architecture arm64 --available-ports 3000,8080 --resources MEDIUM --output json ' ) ;
123123
124124 // Extract blueprint ID from output
125125 const match = stdout . match ( / " i d " : \s * " ( [ ^ " ] + ) " / ) ;
@@ -136,7 +136,7 @@ describe('Blueprint E2E Tests', () => {
136136 if ( ! apiKey ) return ;
137137
138138 // Create a blueprint for logs
139- const { stdout } = await execAsync ( 'node dist/cli.js blueprint create test-blueprint-logs --dockerfile "FROM ubuntu:20.04" --system-setup-commands "apt update" --resources SMALL' ) ;
139+ const { stdout } = await execAsync ( 'node dist/cli.js blueprint create test-blueprint-logs --dockerfile "FROM ubuntu:20.04" --system-setup-commands "apt update" --resources SMALL --output json ' ) ;
140140 const match = stdout . match ( / " i d " : \s * " ( [ ^ " ] + ) " / ) ;
141141 if ( match ) {
142142 blueprintId = match [ 1 ] ;
@@ -148,9 +148,9 @@ describe('Blueprint E2E Tests', () => {
148148 pending ( 'Blueprint not created' ) ;
149149 }
150150
151- const { stdout } = await execAsync ( `node dist/cli.js blueprint logs ${ blueprintId } ` ) ;
151+ const { stdout } = await execAsync ( `node dist/cli.js blueprint logs ${ blueprintId } --output json ` ) ;
152152
153- expect ( stdout ) . toContain ( 'logs= ' ) ;
153+ expect ( stdout ) . toContain ( '" logs": ' ) ;
154154 } , 30000 ) ;
155155 } ) ;
156156} ) ;
0 commit comments