diff --git a/packages/cli/src/__snapshots__/generate-proxy-image.test.ts.snap b/packages/cli/src/__snapshots__/generate-proxy-image.test.ts.snap deleted file mode 100644 index 5d0caee..0000000 --- a/packages/cli/src/__snapshots__/generate-proxy-image.test.ts.snap +++ /dev/null @@ -1,913 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Generate proxy image > success > multiple service > create domain config succesful (domain certs does not exists) 1`] = ` -[MockFunction writeFileSync] { - "calls": [ - [ - "/root/path/.local-ssl-management/nginx.conf", - "user nginx; -worker_processes 20; - -error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - server { - listen 443 ssl; - server_name _; - ssl_certificate /etc/nginx/localhost-cert.pem; - ssl_certificate_key /etc/nginx/localhost-key.pem; - location / { - root /var/www/html; - } - } - - server { - listen 80 default_server; - server_name _; - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - location / { - root /var/www/html; - } - } - - server { - listen 443 ssl; - - autoindex off; - - access_log /var/log/nginx/demo.com.access.log; - error_log /var/log/nginx/demo.com.error.log; - - server_tokens off; - server_name demo.com; - - ssl_certificate /etc/nginx/demo.com-cert.pem; - ssl_certificate_key /etc/nginx/demo.com-key.pem; - - gzip_static on; - - location ~ ^/(/?)(.*) { - gzip on; - gzip_disable "msie6"; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_min_length 256; - gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; - proxy_pass http://11.22.33.445:4000/$2; - proxy_redirect off; - proxy_http_version 1.1; - proxy_cache_bypass $http_upgrade; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_set_header 'Access-Control-Allow-Origin' '*'; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - expires off; - } - -location ~ ^/app-name(/?)(.*) { - gzip on; - gzip_disable "msie6"; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_min_length 256; - gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; - proxy_pass http://11.22.33.445:3000/$2; - proxy_redirect off; - proxy_http_version 1.1; - proxy_cache_bypass $http_upgrade; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_set_header 'Access-Control-Allow-Origin' '*'; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - expires off; - } - } -}", - ], - [ - "/root/path/.local-ssl-management/Dockerfile", - "FROM nginx - -# RUN rm -f /etc/nginx/conf.d/default.conf - -# WORKDIR /var/www/html -# COPY index.html /var/www/html -# RUN chmod 755 /var/www/html/index.html - -COPY nginx.conf /etc/nginx/conf.d/ - -COPY ssl/demo.com-key.pem /etc/nginx/ -COPY ssl/demo.com-cert.pem /etc/nginx/ - -COPY ssl/localhost-key.pem /etc/nginx/ -COPY ssl/localhost-cert.pem /etc/nginx/ - -COPY nginx.conf /etc/nginx/ - -EXPOSE 80 443 - -CMD ["nginx", "-g", "daemon off;"]", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - { - "type": "return", - "value": undefined, - }, - ], -} -`; - -exports[`Generate proxy image > success > multiple service > create domain config succesful (domain certs does not exists) 2`] = ` -[MockFunction spy] { - "calls": [ - [ - " -┌──────────────────┬─────────────┐ -│ domain │ app running │ -├──────────────────┼─────────────┤ -│ https://demo.com │ no │ -└──────────────────┴─────────────┘ -", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - ], -} -`; - -exports[`Generate proxy image > success > multiple service > create domain config succesful (localhost certs does not exists) 1`] = ` -[MockFunction writeFileSync] { - "calls": [ - [ - "/root/path/.local-ssl-management/nginx.conf", - "user nginx; -worker_processes 20; - -error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - server { - listen 443 ssl; - server_name _; - ssl_certificate /etc/nginx/localhost-cert.pem; - ssl_certificate_key /etc/nginx/localhost-key.pem; - location / { - root /var/www/html; - } - } - - server { - listen 80 default_server; - server_name _; - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - location / { - root /var/www/html; - } - } - - server { - listen 443 ssl; - - autoindex off; - - access_log /var/log/nginx/demo.com.access.log; - error_log /var/log/nginx/demo.com.error.log; - - server_tokens off; - server_name demo.com; - - ssl_certificate /etc/nginx/demo.com-cert.pem; - ssl_certificate_key /etc/nginx/demo.com-key.pem; - - gzip_static on; - - location ~ ^/(/?)(.*) { - gzip on; - gzip_disable "msie6"; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_min_length 256; - gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; - proxy_pass http://11.22.33.445:4000/$2; - proxy_redirect off; - proxy_http_version 1.1; - proxy_cache_bypass $http_upgrade; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_set_header 'Access-Control-Allow-Origin' '*'; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - expires off; - } - -location ~ ^/app-name(/?)(.*) { - gzip on; - gzip_disable "msie6"; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_min_length 256; - gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; - proxy_pass http://11.22.33.445:3000/$2; - proxy_redirect off; - proxy_http_version 1.1; - proxy_cache_bypass $http_upgrade; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_set_header 'Access-Control-Allow-Origin' '*'; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - expires off; - } - } -}", - ], - [ - "/root/path/.local-ssl-management/Dockerfile", - "FROM nginx - -# RUN rm -f /etc/nginx/conf.d/default.conf - -# WORKDIR /var/www/html -# COPY index.html /var/www/html -# RUN chmod 755 /var/www/html/index.html - -COPY nginx.conf /etc/nginx/conf.d/ - -COPY ssl/demo.com-key.pem /etc/nginx/ -COPY ssl/demo.com-cert.pem /etc/nginx/ - -COPY ssl/localhost-key.pem /etc/nginx/ -COPY ssl/localhost-cert.pem /etc/nginx/ - -COPY nginx.conf /etc/nginx/ - -EXPOSE 80 443 - -CMD ["nginx", "-g", "daemon off;"]", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - { - "type": "return", - "value": undefined, - }, - ], -} -`; - -exports[`Generate proxy image > success > multiple service > create domain config succesful (localhost certs does not exists) 2`] = ` -[MockFunction spy] { - "calls": [ - [ - " -┌──────────────────┬─────────────┐ -│ domain │ app running │ -├──────────────────┼─────────────┤ -│ https://demo.com │ no │ -└──────────────────┴─────────────┘ -", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - ], -} -`; - -exports[`Generate proxy image > success > multiple service > does not exists localhost certs 1`] = ` -[MockFunction writeFileSync] { - "calls": [ - [ - "/root/path/.local-ssl-management/nginx.conf", - "user nginx; -worker_processes 20; - -error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - server { - listen 443 ssl; - server_name _; - ssl_certificate /etc/nginx/localhost-cert.pem; - ssl_certificate_key /etc/nginx/localhost-key.pem; - location / { - root /var/www/html; - } - } - - server { - listen 80 default_server; - server_name _; - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - location / { - root /var/www/html; - } - } - - server { - listen 443 ssl; - - autoindex off; - - access_log /var/log/nginx/demo.com.access.log; - error_log /var/log/nginx/demo.com.error.log; - - server_tokens off; - server_name demo.com; - - ssl_certificate /etc/nginx/demo.com-cert.pem; - ssl_certificate_key /etc/nginx/demo.com-key.pem; - - gzip_static on; - - location ~ ^/(/?)(.*) { - gzip on; - gzip_disable "msie6"; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_min_length 256; - gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; - proxy_pass http://11.22.33.445:4000/$2; - proxy_redirect off; - proxy_http_version 1.1; - proxy_cache_bypass $http_upgrade; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_set_header 'Access-Control-Allow-Origin' '*'; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - expires off; - } - -location ~ ^/app-name(/?)(.*) { - gzip on; - gzip_disable "msie6"; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_min_length 256; - gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; - proxy_pass http://11.22.33.445:3000/$2; - proxy_redirect off; - proxy_http_version 1.1; - proxy_cache_bypass $http_upgrade; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_set_header 'Access-Control-Allow-Origin' '*'; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - expires off; - } - } -}", - ], - [ - "/root/path/.local-ssl-management/Dockerfile", - "FROM nginx - -# RUN rm -f /etc/nginx/conf.d/default.conf - -# WORKDIR /var/www/html -# COPY index.html /var/www/html -# RUN chmod 755 /var/www/html/index.html - -COPY nginx.conf /etc/nginx/conf.d/ - -COPY ssl/demo.com-key.pem /etc/nginx/ -COPY ssl/demo.com-cert.pem /etc/nginx/ - -COPY ssl/localhost-key.pem /etc/nginx/ -COPY ssl/localhost-cert.pem /etc/nginx/ - -COPY nginx.conf /etc/nginx/ - -EXPOSE 80 443 - -CMD ["nginx", "-g", "daemon off;"]", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - { - "type": "return", - "value": undefined, - }, - ], -} -`; - -exports[`Generate proxy image > success > multiple service > does not exists localhost certs 2`] = ` -[MockFunction spy] { - "calls": [ - [ - " -┌──────────────────┬─────────────┐ -│ domain │ app running │ -├──────────────────┼─────────────┤ -│ https://demo.com │ no │ -└──────────────────┴─────────────┘ -", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - ], -} -`; - -exports[`Generate proxy image > success > single service > create domain config succesful (domain certs does not exists) 1`] = ` -[MockFunction writeFileSync] { - "calls": [ - [ - "/root/path/.local-ssl-management/nginx.conf", - "user nginx; -worker_processes 20; - -error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - server { - listen 443 ssl; - server_name _; - ssl_certificate /etc/nginx/localhost-cert.pem; - ssl_certificate_key /etc/nginx/localhost-key.pem; - location / { - root /var/www/html; - } - } - - server { - listen 80 default_server; - server_name _; - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - location / { - root /var/www/html; - } - } - - server { - listen 443 ssl; - - autoindex off; - - access_log /var/log/nginx/demo.com.access.log; - error_log /var/log/nginx/demo.com.error.log; - - server_tokens off; - server_name demo.com; - - ssl_certificate /etc/nginx/demo.com-cert.pem; - ssl_certificate_key /etc/nginx/demo.com-key.pem; - - gzip_static on; - - location ~ ^/(/?)(.*) { - gzip on; - gzip_disable "msie6"; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_min_length 256; - gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; - proxy_pass http://11.22.33.445:4000/$2; - proxy_redirect off; - proxy_http_version 1.1; - proxy_cache_bypass $http_upgrade; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_set_header 'Access-Control-Allow-Origin' '*'; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - expires off; - } - } -}", - ], - [ - "/root/path/.local-ssl-management/Dockerfile", - "FROM nginx - -# RUN rm -f /etc/nginx/conf.d/default.conf - -# WORKDIR /var/www/html -# COPY index.html /var/www/html -# RUN chmod 755 /var/www/html/index.html - -COPY nginx.conf /etc/nginx/conf.d/ - -COPY ssl/demo.com-key.pem /etc/nginx/ -COPY ssl/demo.com-cert.pem /etc/nginx/ - -COPY ssl/localhost-key.pem /etc/nginx/ -COPY ssl/localhost-cert.pem /etc/nginx/ - -COPY nginx.conf /etc/nginx/ - -EXPOSE 80 443 - -CMD ["nginx", "-g", "daemon off;"]", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - { - "type": "return", - "value": undefined, - }, - ], -} -`; - -exports[`Generate proxy image > success > single service > create domain config succesful (domain certs does not exists) 2`] = ` -[MockFunction spy] { - "calls": [ - [ - " -┌──────────────────┬─────────────┐ -│ domain │ app running │ -├──────────────────┼─────────────┤ -│ https://demo.com │ no │ -└──────────────────┴─────────────┘ -", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - ], -} -`; - -exports[`Generate proxy image > success > single service > create domain config succesful (localhost certs does not exists) 1`] = ` -[MockFunction writeFileSync] { - "calls": [ - [ - "/root/path/.local-ssl-management/nginx.conf", - "user nginx; -worker_processes 20; - -error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - server { - listen 443 ssl; - server_name _; - ssl_certificate /etc/nginx/localhost-cert.pem; - ssl_certificate_key /etc/nginx/localhost-key.pem; - location / { - root /var/www/html; - } - } - - server { - listen 80 default_server; - server_name _; - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - location / { - root /var/www/html; - } - } - - server { - listen 443 ssl; - - autoindex off; - - access_log /var/log/nginx/demo.com.access.log; - error_log /var/log/nginx/demo.com.error.log; - - server_tokens off; - server_name demo.com; - - ssl_certificate /etc/nginx/demo.com-cert.pem; - ssl_certificate_key /etc/nginx/demo.com-key.pem; - - gzip_static on; - - location ~ ^/(/?)(.*) { - gzip on; - gzip_disable "msie6"; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_min_length 256; - gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; - proxy_pass http://11.22.33.445:4000/$2; - proxy_redirect off; - proxy_http_version 1.1; - proxy_cache_bypass $http_upgrade; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_set_header 'Access-Control-Allow-Origin' '*'; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - expires off; - } - } -}", - ], - [ - "/root/path/.local-ssl-management/Dockerfile", - "FROM nginx - -# RUN rm -f /etc/nginx/conf.d/default.conf - -# WORKDIR /var/www/html -# COPY index.html /var/www/html -# RUN chmod 755 /var/www/html/index.html - -COPY nginx.conf /etc/nginx/conf.d/ - -COPY ssl/demo.com-key.pem /etc/nginx/ -COPY ssl/demo.com-cert.pem /etc/nginx/ - -COPY ssl/localhost-key.pem /etc/nginx/ -COPY ssl/localhost-cert.pem /etc/nginx/ - -COPY nginx.conf /etc/nginx/ - -EXPOSE 80 443 - -CMD ["nginx", "-g", "daemon off;"]", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - { - "type": "return", - "value": undefined, - }, - ], -} -`; - -exports[`Generate proxy image > success > single service > create domain config succesful (localhost certs does not exists) 2`] = ` -[MockFunction spy] { - "calls": [ - [ - " -┌──────────────────┬─────────────┐ -│ domain │ app running │ -├──────────────────┼─────────────┤ -│ https://demo.com │ no │ -└──────────────────┴─────────────┘ -", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - ], -} -`; - -exports[`Generate proxy image > success > single service > does not exists localhost certs 1`] = ` -[MockFunction writeFileSync] { - "calls": [ - [ - "/root/path/.local-ssl-management/nginx.conf", - "user nginx; -worker_processes 20; - -error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - server { - listen 443 ssl; - server_name _; - ssl_certificate /etc/nginx/localhost-cert.pem; - ssl_certificate_key /etc/nginx/localhost-key.pem; - location / { - root /var/www/html; - } - } - - server { - listen 80 default_server; - server_name _; - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - location / { - root /var/www/html; - } - } - - server { - listen 443 ssl; - - autoindex off; - - access_log /var/log/nginx/domain.tld.access.log; - error_log /var/log/nginx/domain.tld.error.log; - - server_tokens off; - server_name domain.tld; - - ssl_certificate /etc/nginx/domain.tld-cert.pem; - ssl_certificate_key /etc/nginx/domain.tld-key.pem; - - gzip_static on; - - location ~ ^/(/?)(.*) { - gzip on; - gzip_disable "msie6"; - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_min_length 256; - gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; - proxy_pass http://11.22.33.445:3000/$2; - proxy_redirect off; - proxy_http_version 1.1; - proxy_cache_bypass $http_upgrade; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_set_header 'Access-Control-Allow-Origin' '*'; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - expires off; - } - } -}", - ], - [ - "/root/path/.local-ssl-management/Dockerfile", - "FROM nginx - -# RUN rm -f /etc/nginx/conf.d/default.conf - -# WORKDIR /var/www/html -# COPY index.html /var/www/html -# RUN chmod 755 /var/www/html/index.html - -COPY nginx.conf /etc/nginx/conf.d/ - -COPY ssl/domain.tld-key.pem /etc/nginx/ -COPY ssl/domain.tld-cert.pem /etc/nginx/ - -COPY ssl/localhost-key.pem /etc/nginx/ -COPY ssl/localhost-cert.pem /etc/nginx/ - -COPY nginx.conf /etc/nginx/ - -EXPOSE 80 443 - -CMD ["nginx", "-g", "daemon off;"]", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - { - "type": "return", - "value": undefined, - }, - ], -} -`; - -exports[`Generate proxy image > success > single service > does not exists localhost certs 2`] = ` -[MockFunction spy] { - "calls": [ - [ - " -┌────────────────────┬─────────────┐ -│ domain │ app running │ -├────────────────────┼─────────────┤ -│ https://domain.tld │ no │ -└────────────────────┴─────────────┘ -", - ], - ], - "results": [ - { - "type": "return", - "value": undefined, - }, - ], -} -`; diff --git a/packages/cli/src/on-update-action.test.ts b/packages/cli/src/on-update-action.test.ts index 4f3cc9b..4821d34 100644 --- a/packages/cli/src/on-update-action.test.ts +++ b/packages/cli/src/on-update-action.test.ts @@ -6,13 +6,7 @@ import onUpdateAction from "@/on-update-action"; import { validatePort } from "@/utils"; vi.mock("@/utils/validate-port"); - vi.mock("@/list-container"); -vi.mock("path", () => ({ - default: { - resolve: () => "/root/path", - }, -})); describe("Actions - onUpdateAction", () => { describe("failures", () => { diff --git a/packages/cli/src/utils/hosts.test.ts b/packages/cli/src/utils/hosts.test.ts index 0bf63bf..0b30764 100644 --- a/packages/cli/src/utils/hosts.test.ts +++ b/packages/cli/src/utils/hosts.test.ts @@ -5,12 +5,6 @@ import { HOSTS_END, HOSTS_START } from "@/constants"; import { getContentFromHosts, setContentToHosts, updateHosts } from "./hosts"; -vi.mock("path", () => ({ - default: { - resolve: () => "/root/path", - }, -})); - describe("Utils - hosts", () => { test("move domain if already exists without Local SSL config slot", async () => { vi.spyOn(fs, "readFile").mockReturnValue(