@@ -57,16 +57,14 @@ describe('Integration test for up command with helix pages', function suite() {
57
57
. withOpen ( '/' )
58
58
. withHttpPort ( 0 ) ;
59
59
60
- nock ( 'https://master--dummy-foo--adobe.hlx.page' )
61
- . get ( '/fstab.yaml' )
62
- . reply ( 200 , 'dummy' )
60
+ nock ( 'https://main--dummy-foo--adobe.hlx.page' )
63
61
. get ( '/index.html' )
64
62
. reply ( 200 , '## Welcome' )
65
63
. get ( '/not-found.txt' )
66
64
. reply ( 404 ) ;
67
65
68
66
nock ( 'https://admin.hlx.page:443' )
69
- . get ( '/sidekick/adobe/dummy-foo/master /config.json' )
67
+ . get ( '/sidekick/adobe/dummy-foo/main /config.json' )
70
68
. reply ( 404 ) ;
71
69
72
70
let port ;
@@ -114,20 +112,18 @@ describe('Integration test for up command with helix pages', function suite() {
114
112
. withOpen ( '/' )
115
113
. withHttpPort ( 0 ) ;
116
114
117
- nock ( 'https://master--dummy-foo--adobe.aem.page' )
118
- . get ( '/fstab.yaml' )
119
- . reply ( 200 , 'dummy' )
115
+ nock ( 'https://main--dummy-foo--adobe.aem.page' )
120
116
. get ( '/index.html' )
121
117
. reply ( 200 , '## Welcome' )
122
118
. get ( '/not-found.txt' )
123
119
. reply ( 404 ) ;
124
120
125
121
nock ( 'https://admin.hlx.page:443' )
126
- . get ( '/sidekick/adobe/dummy-foo/master /config.json' )
122
+ . get ( '/sidekick/adobe/dummy-foo/main /config.json' )
127
123
. reply ( 200 , {
128
124
host : 'example.com' ,
129
- liveHost : 'master --dummy-foo--adobe.aem.live' ,
130
- previewHost : 'master --dummy-foo--adobe..aem.page' ,
125
+ liveHost : 'main --dummy-foo--adobe.aem.live' ,
126
+ previewHost : 'main --dummy-foo--adobe..aem.page' ,
131
127
project : 'Example Project on Helix 5' ,
132
128
testProperty : 'header' ,
133
129
} ) ;
@@ -175,64 +171,14 @@ describe('Integration test for up command with helix pages', function suite() {
175
171
return cmd . stop ( ) ;
176
172
} ;
177
173
178
- nock ( 'https://tripod-test--dummy-foo--adobe.hlx.page' )
179
- . get ( '/fstab.yaml' )
180
- . reply ( 200 , 'dummy' )
181
- . get ( '/index.html' )
182
- . reply ( 200 , '## Welcome' )
183
- . get ( '/not-found.txt' )
184
- . reply ( 404 ) ;
185
-
186
- nock ( 'https://admin.hlx.page:443' )
187
- . get ( '/sidekick/adobe/dummy-foo/tripod/test/config.json' )
188
- . reply ( 404 ) ;
189
-
190
- cmd
191
- . on ( 'started' , async ( ) => {
192
- try {
193
- let ret = await assertHttp ( `http://127.0.0.1:${ cmd . project . server . port } /index.html` , 200 ) ;
194
- assert . strictEqual ( ret . trim ( ) , '## Welcome' ) ;
195
- ret = await assertHttp ( `http://127.0.0.1:${ cmd . project . server . port } /local.txt` , 200 ) ;
196
- assert . strictEqual ( ret . trim ( ) , 'Hello, world.' ) ;
197
- await assertHttp ( `http://127.0.0.1:${ cmd . project . server . port } /not-found.txt` , 404 ) ;
198
- await myDone ( ) ;
199
- } catch ( e ) {
200
- await myDone ( e ) ;
201
- }
202
- } )
203
- . on ( 'stopped' , ( ) => {
204
- done ( error ) ;
205
- } )
206
- . run ( )
207
- . catch ( done ) ;
208
- } ) ;
209
-
210
- it ( 'up command switches to main branch if needed.' , ( done ) => {
211
- initGit ( testDir , 'https://github.com/adobe/dummy-foo.git' ) ;
212
- let error = null ;
213
- const cmd = new UpCommand ( )
214
- . withLiveReload ( false )
215
- . withDirectory ( testDir )
216
- . withOpen ( false )
217
- . withHttpPort ( 0 ) ;
218
-
219
- const myDone = ( err ) => {
220
- error = err ;
221
- return cmd . stop ( ) ;
222
- } ;
223
-
224
174
nock ( 'https://main--dummy-foo--adobe.hlx.page' )
225
175
. get ( '/index.html' )
226
176
. reply ( 200 , '## Welcome' )
227
177
. get ( '/not-found.txt' )
228
178
. reply ( 404 ) ;
229
179
230
- nock ( 'https://master--dummy-foo--adobe.hlx.page' )
231
- . get ( '/fstab.yaml' )
232
- . reply ( 404 , 'dummy' ) ;
233
-
234
180
nock ( 'https://admin.hlx.page:443' )
235
- . get ( '/sidekick/adobe/dummy-foo/master /config.json' )
181
+ . get ( '/sidekick/adobe/dummy-foo/main /config.json' )
236
182
. reply ( 404 ) ;
237
183
238
184
cmd
@@ -275,20 +221,9 @@ describe('Integration test for up command with helix pages', function suite() {
275
221
. get ( '/not-found.txt' )
276
222
. reply ( 404 ) ;
277
223
278
- nock ( 'https://master--dummy-foo--adobe.hlx.page' )
279
- . get ( '/fstab.yaml' )
280
- . reply ( 404 , 'dummy' ) ;
281
-
282
- nock ( 'https://new-branch--dummy-foo--adobe.hlx.page' )
283
- . get ( '/fstab.yaml' )
284
- . reply ( 200 , 'yep!' ) ;
285
-
286
224
nock ( 'https://admin.hlx.page:443' )
287
- . get ( '/sidekick/adobe/dummy-foo/master/config.json' )
288
- . reply ( 404 ) ;
289
-
290
- nock ( 'https://admin.hlx.page:443' )
291
- . get ( '/sidekick/adobe/dummy-foo/new-branch/config.json' )
225
+ . get ( '/sidekick/adobe/dummy-foo/main/config.json' )
226
+ . twice ( )
292
227
. reply ( 404 ) ;
293
228
294
229
let timer ;
@@ -306,7 +241,7 @@ describe('Integration test for up command with helix pages', function suite() {
306
241
timer = signal ( 5000 ) ;
307
242
await timer ;
308
243
// eslint-disable-next-line no-underscore-dangle
309
- assert . strictEqual ( cmd . _url , 'https://new-branch --dummy-foo--adobe.hlx.page' ) ;
244
+ assert . strictEqual ( cmd . _url , 'https://main --dummy-foo--adobe.hlx.page' ) ;
310
245
await myDone ( ) ;
311
246
} catch ( e ) {
312
247
await myDone ( e ) ;
@@ -336,16 +271,9 @@ describe('Integration test for up command with helix pages', function suite() {
336
271
. get ( '/not-found.txt' )
337
272
. reply ( 404 ) ;
338
273
339
- nock ( 'https://master--dummy-foo--adobe.hlx.page' )
340
- . get ( '/fstab.yaml' )
341
- . reply ( 404 , 'dummy' ) ;
342
-
343
- nock ( 'https://admin.hlx.page:443' )
344
- . get ( '/sidekick/adobe/dummy-foo/master/config.json' )
345
- . reply ( 404 ) ;
346
-
347
274
nock ( 'https://admin.hlx.page:443' )
348
- . get ( '/sidekick/adobe/dummy-foo/new-and-totally-unreasonably-long-in-fact-too-long-branch/config.json' )
275
+ . get ( '/sidekick/adobe/dummy-foo/main/config.json' )
276
+ . twice ( )
349
277
. reply ( 404 ) ;
350
278
351
279
let timer ;
@@ -411,9 +339,7 @@ describe('Integration test for up command with cache', function suite() {
411
339
page2 : '## Some different content for different qs' ,
412
340
plain : 'Some plain content' ,
413
341
} ;
414
- nock ( 'https://master--dummy-foo--adobe.hlx.page' )
415
- . get ( '/fstab.yaml' )
416
- . reply ( 200 , 'dummy' )
342
+ nock ( 'https://main--dummy-foo--adobe.hlx.page' )
417
343
. get ( '/index.html' )
418
344
. reply ( 200 , content . index )
419
345
. get ( '/folder/page.html?foo=bar&baz=qux' )
@@ -428,7 +354,7 @@ describe('Integration test for up command with cache', function suite() {
428
354
. reply ( 200 , '<link rel="stylesheet" href="/styles.css"/>' ) ;
429
355
430
356
nock ( 'https://admin.hlx.page:443' )
431
- . get ( '/sidekick/adobe/dummy-foo/master /config.json' )
357
+ . get ( '/sidekick/adobe/dummy-foo/main /config.json' )
432
358
. reply ( 404 ) ;
433
359
434
360
nock . enableNetConnect ( / 1 2 7 .0 .0 .1 / ) ;
0 commit comments