@@ -85,7 +85,7 @@ test('Should deploy simple docker project', async () => {
8585 const name = completeDeployments [ 0 ] . Name . slice ( 1 ) ;
8686
8787 expect ( containerInfo ) . toBeDefined ( ) ;
88- expect ( containerInfo . Labels [ 'exoframe.deployment' ] ) . toEqual ( name ) ;
88+ expect ( containerInfo . Labels [ 'exoframe.deployment' ] ) . toEqual ( name . split ( '-' ) . slice ( 0 , - 1 ) . join ( '-' ) ) ;
8989 expect ( containerInfo . Labels [ 'exoframe.user' ] ) . toEqual ( 'admin' ) ;
9090 expect ( containerInfo . Labels [ 'exoframe.project' ] ) . toEqual ( 'test-project' ) ;
9191 expect ( containerInfo . Labels [ 'traefik.docker.network' ] ) . toEqual ( 'exoframe' ) ;
@@ -103,7 +103,7 @@ test('Should deploy simple docker project', async () => {
103103 expect ( container . Config . Env ) . toContain ( 'EXOFRAME_USER=admin' ) ;
104104 expect ( container . Config . Env ) . toContain ( 'EXOFRAME_PROJECT=test-project' ) ;
105105 expect (
106- container . Config . Env . find ( ( env ) => env . startsWith ( 'EXOFRAME_DEPLOYMENT=exo-admin-test-docker-deploy- ' ) )
106+ container . Config . Env . find ( ( env ) => env . startsWith ( 'EXOFRAME_DEPLOYMENT=exo-admin-test-docker-deploy' ) )
107107 ) . toBeDefined ( ) ;
108108 expect ( container . Config . Env . find ( ( env ) => env . startsWith ( 'EXOFRAME_HOST=test-docker-deploy' ) ) ) . toBeDefined ( ) ;
109109
@@ -136,7 +136,7 @@ test('Should deploy simple docker project with custom mount type', async () => {
136136 const name = completeDeployments [ 0 ] . Name . slice ( 1 ) ;
137137
138138 expect ( containerInfo ) . toBeDefined ( ) ;
139- expect ( containerInfo . Labels [ 'exoframe.deployment' ] ) . toEqual ( name ) ;
139+ expect ( containerInfo . Labels [ 'exoframe.deployment' ] ) . toEqual ( name . split ( '-' ) . slice ( 0 , - 1 ) . join ( '-' ) ) ;
140140 expect ( containerInfo . Labels [ 'exoframe.user' ] ) . toEqual ( 'admin' ) ;
141141 expect ( containerInfo . Labels [ 'exoframe.project' ] ) . toEqual ( 'test-mount-project' ) ;
142142 expect ( containerInfo . Labels [ 'traefik.docker.network' ] ) . toEqual ( 'exoframe' ) ;
@@ -155,7 +155,7 @@ test('Should deploy simple docker project with custom mount type', async () => {
155155 expect ( container . Config . Env ) . toContain ( 'EXOFRAME_PROJECT=test-mount-project' ) ;
156156 expect (
157157 container . Config . Env . find ( ( env ) =>
158- env . startsWith ( 'EXOFRAME_DEPLOYMENT=exo-admin-test-docker-deploy-with-custom-mount- ' )
158+ env . startsWith ( 'EXOFRAME_DEPLOYMENT=exo-admin-test-docker-deploy-with-custom-mount' )
159159 )
160160 ) . toBeDefined ( ) ;
161161 expect (
@@ -191,7 +191,7 @@ test('Should deploy simple docker project with buildargs', async () => {
191191 const name = completeDeployments [ 0 ] . Name . slice ( 1 ) ;
192192
193193 expect ( containerInfo ) . toBeDefined ( ) ;
194- expect ( containerInfo . Labels [ 'exoframe.deployment' ] ) . toEqual ( name ) ;
194+ expect ( containerInfo . Labels [ 'exoframe.deployment' ] ) . toEqual ( name . split ( '-' ) . slice ( 0 , - 1 ) . join ( '-' ) ) ;
195195 expect ( containerInfo . Labels [ 'exoframe.user' ] ) . toEqual ( 'admin' ) ;
196196 expect ( containerInfo . Labels [ 'exoframe.project' ] ) . toEqual ( 'test-project-buildargs' ) ;
197197 expect ( containerInfo . Labels [ 'traefik.docker.network' ] ) . toEqual ( 'exoframe' ) ;
@@ -233,7 +233,7 @@ test('Should deploy simple project from image and image tar', async () => {
233233 const name = completeDeployments [ 0 ] . Name . slice ( 1 ) ;
234234
235235 expect ( containerInfo ) . toBeDefined ( ) ;
236- expect ( containerInfo . Labels [ 'exoframe.deployment' ] ) . toEqual ( name ) ;
236+ expect ( containerInfo . Labels [ 'exoframe.deployment' ] ) . toEqual ( name . split ( '-' ) . slice ( 0 , - 1 ) . join ( '-' ) ) ;
237237 expect ( containerInfo . Labels [ 'exoframe.user' ] ) . toEqual ( 'admin' ) ;
238238 expect ( containerInfo . Labels [ 'exoframe.project' ] ) . toEqual ( 'test-image-project' ) ;
239239 expect ( containerInfo . Labels [ 'traefik.docker.network' ] ) . toEqual ( 'exoframe' ) ;
@@ -274,7 +274,7 @@ test('Should deploy simple project from external image', async () => {
274274 const name = completeDeployments [ 0 ] . Name . slice ( 1 ) ;
275275
276276 expect ( containerInfo ) . toBeDefined ( ) ;
277- expect ( containerInfo . Labels [ 'exoframe.deployment' ] ) . toEqual ( name ) ;
277+ expect ( containerInfo . Labels [ 'exoframe.deployment' ] ) . toEqual ( name . split ( '-' ) . slice ( 0 , - 1 ) . join ( '-' ) ) ;
278278 expect ( containerInfo . Labels [ 'exoframe.user' ] ) . toEqual ( 'admin' ) ;
279279 expect ( containerInfo . Labels [ 'exoframe.project' ] ) . toEqual ( 'test-extimage-project' ) ;
280280 expect ( containerInfo . Labels [ 'traefik.docker.network' ] ) . toEqual ( 'exoframe' ) ;
@@ -316,7 +316,7 @@ test('Should deploy simple node project', async () => {
316316 const deployId = name . split ( '-' ) . slice ( - 1 ) . shift ( ) ;
317317
318318 expect ( container ) . toBeDefined ( ) ;
319- expect ( container . Labels [ 'exoframe.deployment' ] ) . toEqual ( name ) ;
319+ expect ( container . Labels [ 'exoframe.deployment' ] ) . toEqual ( name . split ( '-' ) . slice ( 0 , - 1 ) . join ( '-' ) ) ;
320320 expect ( container . Labels [ 'exoframe.user' ] ) . toEqual ( 'admin' ) ;
321321 expect ( container . Labels [ 'exoframe.project' ] ) . toEqual ( name . replace ( `-${ deployId } ` , '' ) ) ;
322322 expect ( container . Labels [ 'traefik.docker.network' ] ) . toEqual ( 'exoframe' ) ;
@@ -354,7 +354,7 @@ test('Should deploy simple node project with package-lock', async () => {
354354 const deployId = name . split ( '-' ) . slice ( - 1 ) . shift ( ) ;
355355
356356 expect ( container ) . toBeDefined ( ) ;
357- expect ( container . Labels [ 'exoframe.deployment' ] ) . toEqual ( name ) ;
357+ expect ( container . Labels [ 'exoframe.deployment' ] ) . toEqual ( name . split ( '-' ) . slice ( 0 , - 1 ) . join ( '-' ) ) ;
358358 expect ( container . Labels [ 'exoframe.user' ] ) . toEqual ( 'admin' ) ;
359359 expect ( container . Labels [ 'exoframe.project' ] ) . toEqual ( name . replace ( `-${ deployId } ` , '' ) ) ;
360360 expect ( container . Labels [ 'traefik.docker.network' ] ) . toEqual ( 'exoframe' ) ;
@@ -391,7 +391,7 @@ test('Should deploy simple HTML project', async () => {
391391 const container = allContainers . find ( ( c ) => c . Names . includes ( `/${ name } ` ) ) ;
392392
393393 expect ( container ) . toBeDefined ( ) ;
394- expect ( container . Labels [ 'exoframe.deployment' ] ) . toEqual ( name ) ;
394+ expect ( container . Labels [ 'exoframe.deployment' ] ) . toEqual ( name . split ( '-' ) . slice ( 0 , - 1 ) . join ( '-' ) ) ;
395395 expect ( container . Labels [ 'exoframe.user' ] ) . toEqual ( 'admin' ) ;
396396 expect ( container . Labels [ 'exoframe.project' ] ) . toEqual ( 'simple-html' ) ;
397397 expect ( container . Labels [ 'traefik.docker.network' ] ) . toEqual ( 'exoframe' ) ;
@@ -432,7 +432,7 @@ test('Should update simple HTML project', async () => {
432432 const container = allContainers . find ( ( c ) => c . Names . includes ( `/${ name } ` ) ) ;
433433
434434 expect ( container ) . toBeDefined ( ) ;
435- expect ( container . Labels [ 'exoframe.deployment' ] ) . toEqual ( name ) ;
435+ expect ( container . Labels [ 'exoframe.deployment' ] ) . toEqual ( name . split ( '-' ) . slice ( 0 , - 1 ) . join ( '-' ) ) ;
436436 expect ( container . Labels [ 'exoframe.user' ] ) . toEqual ( 'admin' ) ;
437437 expect ( container . Labels [ 'exoframe.project' ] ) . toEqual ( 'simple-html' ) ;
438438 expect ( container . Labels [ 'traefik.docker.network' ] ) . toEqual ( 'exoframe' ) ;
@@ -590,7 +590,7 @@ test('Should deploy project with configured template', async () => {
590590 const deployId = name . split ( '-' ) . slice ( - 1 ) . shift ( ) ;
591591
592592 expect ( container ) . toBeDefined ( ) ;
593- expect ( container . Labels [ 'exoframe.deployment' ] ) . toEqual ( name ) ;
593+ expect ( container . Labels [ 'exoframe.deployment' ] ) . toEqual ( name . split ( '-' ) . slice ( 0 , - 1 ) . join ( '-' ) ) ;
594594 expect ( container . Labels [ 'exoframe.user' ] ) . toEqual ( 'admin' ) ;
595595 expect ( container . Labels [ 'exoframe.project' ] ) . toEqual ( name . replace ( `-${ deployId } ` , '' ) ) ;
596596 expect ( container . Labels [ 'traefik.docker.network' ] ) . toEqual ( 'exoframe' ) ;
0 commit comments