1
+ import { platform } from "os" ;
1
2
import * as path from "path" ;
2
3
import { test } from "tap" ;
3
4
@@ -13,7 +14,11 @@ import {
13
14
const getDockerfileFixturePath = ( folder ) =>
14
15
path . join ( __dirname , "../fixtures/dockerfiles/library" , folder , "Dockerfile" ) ;
15
16
16
- test ( "attempt to connect to non-existent host" , ( t ) => {
17
+ test ( "attempt to connect to non-existent host" , async ( t ) => {
18
+ if ( platform ( ) === "win32" ) {
19
+ return ;
20
+ }
21
+
17
22
const host = "does-not-exist:1234" ;
18
23
const options = { host } ;
19
24
@@ -48,6 +53,10 @@ test("inspect an image that does not exist and is not pullable", (t) => {
48
53
} ) ;
49
54
50
55
test ( "inspect an image with an unsupported pkg manager" , async ( t ) => {
56
+ if ( platform ( ) === "win32" ) {
57
+ return ;
58
+ }
59
+
51
60
const imgName = "archlinux/base@sha256" ;
52
61
const imgTag =
53
62
"42b6236b8f1b85a3bea6c8055f7e290f503440f722c9b4f82cc04bdcf3bcfcef" ;
@@ -67,6 +76,10 @@ test("inspect an image with an unsupported pkg manager", async (t) => {
67
76
} ) ;
68
77
69
78
test ( "inspect a scratch image" , async ( t ) => {
79
+ if ( platform ( ) === "win32" ) {
80
+ return ;
81
+ }
82
+
70
83
const imgName = "busybox" ;
71
84
const imgTag = "1.31.1" ;
72
85
const img = imgName + ":" + imgTag ;
@@ -84,7 +97,11 @@ test("inspect a scratch image", async (t) => {
84
97
t . same ( pluginResult . plugin . packageManager , "linux" , "package manager linux" ) ;
85
98
} ) ;
86
99
87
- test ( "inspect node:6.14.2 - provider and regular pkg as same dependency" , ( t ) => {
100
+ test ( "inspect node:6.14.2 - provider and regular pkg as same dependency" , async ( t ) => {
101
+ if ( platform ( ) === "win32" ) {
102
+ return ;
103
+ }
104
+
88
105
const imgName = "node" ;
89
106
const imgTag = "6.14.2" ;
90
107
const img = imgName + ":" + imgTag ;
@@ -189,7 +206,11 @@ test("inspect node:6.14.2 - provider and regular pkg as same dependency", (t) =>
189
206
} ) ;
190
207
} ) ;
191
208
192
- test ( "inspect nginx:1.13.10" , ( t ) => {
209
+ test ( "inspect nginx:1.13.10" , async ( t ) => {
210
+ if ( platform ( ) === "win32" ) {
211
+ return ;
212
+ }
213
+
193
214
const imgName = "nginx" ;
194
215
const imgTag = "1.13.10" ;
195
216
const img = imgName + ":" + imgTag ;
@@ -344,7 +365,11 @@ test("inspect nginx:1.13.10", (t) => {
344
365
} ) ;
345
366
} ) ;
346
367
347
- test ( "inspect redis:3.2.11-alpine" , ( t ) => {
368
+ test ( "inspect redis:3.2.11-alpine" , async ( t ) => {
369
+ if ( platform ( ) === "win32" ) {
370
+ return ;
371
+ }
372
+
348
373
const imgName = "redis" ;
349
374
const imgTag = "3.2.11-alpine" ;
350
375
const img = imgName + ":" + imgTag ;
@@ -581,6 +606,10 @@ test("inspect redis:3.2.11-alpine", (t) => {
581
606
test (
582
607
"inspect image with hostname " + "localhost:5000/redis:3.2.11-alpine" ,
583
608
async ( t ) => {
609
+ if ( platform ( ) === "win32" ) {
610
+ return ;
611
+ }
612
+
584
613
const imgName = "redis" ;
585
614
const imgTag = "3.2.11-alpine" ;
586
615
const img = imgName + ":" + imgTag ;
@@ -614,6 +643,10 @@ test(
614
643
) ;
615
644
616
645
test ( "inspect image with sha@256 " + "ubuntu@sha256" , async ( t ) => {
646
+ if ( platform ( ) === "win32" ) {
647
+ return ;
648
+ }
649
+
617
650
const imgName = "ubuntu" ;
618
651
const imgTag = "" ;
619
652
const imgSha =
@@ -644,6 +677,10 @@ test(
644
677
"inspect image with hostname plus additional namespacing: " +
645
678
"localhost:5000/redis:3.2.11-alpine" ,
646
679
async ( t ) => {
680
+ if ( platform ( ) === "win32" ) {
681
+ return ;
682
+ }
683
+
647
684
const imgName = "redis" ;
648
685
const imgTag = "3.2.11-alpine" ;
649
686
const img = imgName + ":" + imgTag ;
@@ -667,7 +704,11 @@ test(
667
704
} ,
668
705
) ;
669
706
670
- test ( "inspect centos" , ( t ) => {
707
+ test ( "inspect centos" , async ( t ) => {
708
+ if ( platform ( ) === "win32" ) {
709
+ return ;
710
+ }
711
+
671
712
const imgName = "centos" ;
672
713
const imgTag = "7.4.1708" ;
673
714
const img = imgName + ":" + imgTag ;
0 commit comments