@schemastore/container-structure-test 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) Florian Keller. All rights reserved.
3
+ Copyright (c) Florian Imdahl. All rights reserved.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -5,8 +5,8 @@
5
5
  This package contains type definitions for container-structure-test.
6
6
 
7
7
  ## Details
8
- Files were exported from https://github.com/ffflorian/schemastore-updater/tree/master/schemas/container-structure-test.
8
+ Files were exported from https://github.com/ffflorian/schemastore-updater/tree/main/schemas/container-structure-test.
9
9
 
10
10
  ## Additional Details
11
- * Last updated: Wed, May 06, 2020, 20:22:29 GMT
11
+ * Last updated: Fri, Feb 24, 2023, 11:23:32 GMT
12
12
  * Dependencies: none
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* tslint:disable */
1
+ /* eslint-disable */
2
2
  /**
3
3
  * This file was automatically generated by json-schema-to-typescript.
4
4
  * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
@@ -29,7 +29,7 @@ export interface ContainerStructureTests {
29
29
  * A list of commands (each with optional flags) to run after the actual command under test.
30
30
  */
31
31
  teardown?: string[][];
32
- envVars?: EnvVar[];
32
+ envVars?: DefinitionsEnvVar[];
33
33
  /**
34
34
  * The command to run in the test.
35
35
  */
@@ -40,25 +40,33 @@ export interface ContainerStructureTests {
40
40
  args?: string[];
41
41
  /**
42
42
  * List of regexes that should match the stdout from running the command.
43
+ *
44
+ * @minItems 1
43
45
  */
44
- expectedOutput?: string[];
46
+ expectedOutput?: [string, ...string[]];
45
47
  /**
46
48
  * List of regexes that should not match the stdout from running the command..
49
+ *
50
+ * @minItems 1
47
51
  */
48
- excludedOutput?: string[];
52
+ excludedOutput?: [string, ...string[]];
49
53
  /**
50
54
  * List of regexes that should match the stderr from running the command.
55
+ *
56
+ * @minItems 1
51
57
  */
52
- expectedError?: string[];
58
+ expectedError?: [string, ...string[]];
53
59
  /**
54
60
  * List of regexes that should not match the stderr from running the command.
61
+ *
62
+ * @minItems 1
55
63
  */
56
- excludedError?: string[];
64
+ excludedError?: [string, ...string[]];
57
65
  /**
58
66
  * Exit code that the command should exit with.
59
67
  */
60
68
  exitCode?: number;
61
- [k: string]: any;
69
+ [k: string]: unknown;
62
70
  }[];
63
71
  /**
64
72
  * File existence tests check to make sure a specific file (or directory) exist within the file system of the image. No contents of the files or directories are checked. These tests can also be used to ensure a file or directory is not present in the file system.
@@ -67,15 +75,15 @@ export interface ContainerStructureTests {
67
75
  /**
68
76
  * The name of the test
69
77
  */
70
- name?: string;
78
+ name: string;
71
79
  /**
72
80
  * Path to the file or directory under test
73
81
  */
74
- path?: string;
82
+ path: string;
75
83
  /**
76
84
  * Whether or not the specified file or directory should exist in the file system
77
85
  */
78
- shouldExist?: boolean;
86
+ shouldExist: boolean;
79
87
  /**
80
88
  * The expected Unix permission string (e.g. drwxrwxrwx) of the files or directory.
81
89
  */
@@ -92,7 +100,7 @@ export interface ContainerStructureTests {
92
100
  * Checks if file is executable by a given user.
93
101
  */
94
102
  isExecutableBy?: "owner" | "group" | "any" | "other";
95
- [k: string]: any;
103
+ [k: string]: unknown;
96
104
  }[];
97
105
  /**
98
106
  * File content tests open a file on the file system and check its contents. These tests assume the specified file is a file, and that it exists
@@ -108,13 +116,17 @@ export interface ContainerStructureTests {
108
116
  path: string;
109
117
  /**
110
118
  * List of regexes that should match the contents of the file
119
+ *
120
+ * @minItems 1
111
121
  */
112
- expectedContents?: string[];
122
+ expectedContents?: [string, ...string[]];
113
123
  /**
114
124
  * List of regexes that should not match the contents of the file
125
+ *
126
+ * @minItems 1
115
127
  */
116
- excludedContents?: string[];
117
- [k: string]: any;
128
+ excludedContents?: [string, ...string[]];
129
+ [k: string]: unknown;
118
130
  }[];
119
131
  /**
120
132
  * License tests check a list of copyright files and makes sure all licenses are allowed at Google. By default it will look at where Debian lists all copyright files, but can also look at an arbitrary list of files.
@@ -126,62 +138,75 @@ export interface ContainerStructureTests {
126
138
  debian: boolean;
127
139
  /**
128
140
  * A list of other files to check.
141
+ *
142
+ * @minItems 1
129
143
  */
130
- files?: string[];
131
- [k: string]: any;
144
+ files?: [string, ...string[]];
145
+ [k: string]: unknown;
132
146
  }[];
133
147
  metadataTest?: {
134
148
  /**
135
149
  * A list of environment variable key/value pairs that should be set in the container.
150
+ *
151
+ * @minItems 1
136
152
  */
137
- env?: {
138
- /**
139
- * The name of the environment variables
140
- */
141
- key: string;
142
- /**
143
- * The value of the environment variable
144
- */
145
- value: string;
146
- }[];
153
+ env?: [DefinitionsEnvVar, ...DefinitionsEnvVar[]];
147
154
  /**
148
155
  * A list of image labels key/value pairs that should be set on the container.
156
+ *
157
+ * @minItems 1
149
158
  */
150
- labels?: {
151
- /**
152
- * The name of the label
153
- */
154
- key: string;
155
- /**
156
- * The value of the label
157
- */
158
- value: string;
159
- }[];
159
+ labels?: [DefinitionsLabel, ...DefinitionsLabel[]];
160
160
  /**
161
161
  * The entrypoint of the container
162
+ *
163
+ * @minItems 1
162
164
  */
163
- entrypoint?: string[];
165
+ entrypoint?: [string, ...string[]];
164
166
  /**
165
167
  * The CMD specified in the container
168
+ *
169
+ * @minItems 1
166
170
  */
167
- cmd?: string[];
168
- [k: string]: any;
169
- };
170
- /**
171
- * A list of environment variables can optionally be specified as part of the test setup.
172
- */
173
- globalEnvVars?: {
171
+ cmd?: [string, ...string[]];
174
172
  /**
175
- * The name of the environment variables
173
+ * The ports exposed in the container.
174
+ *
175
+ * @minItems 1
176
176
  */
177
- key: string;
177
+ exposedPorts?: [string, ...string[]];
178
178
  /**
179
- * The value of the environment variable
179
+ * The ports NOT exposed in the container.
180
+ *
181
+ * @minItems 1
180
182
  */
181
- value: string;
182
- }[];
183
+ unexposedPorts?: [string, ...string[]];
184
+ /**
185
+ * The volumes exposed in the container.
186
+ *
187
+ * @minItems 1
188
+ */
189
+ volumes?: [string, ...string[]];
190
+ /**
191
+ * The volumes NOT exposed in the container
192
+ *
193
+ * @minItems 1
194
+ */
195
+ unmountedVolumes?: [string, ...string[]];
196
+ /**
197
+ * The default working directory of the container.
198
+ */
199
+ workdir?: string;
200
+ [k: string]: unknown;
201
+ };
202
+ /**
203
+ * A list of environment variables can optionally be specified as part of the test setup.
204
+ *
205
+ * @minItems 1
206
+ */
207
+ globalEnvVars?: [DefinitionsEnvVar, ...DefinitionsEnvVar[]];
183
208
  }
184
- export interface EnvVar {
209
+ export interface DefinitionsEnvVar {
185
210
  /**
186
211
  * The name of the environment variables
187
212
  */
@@ -191,3 +216,17 @@ export interface EnvVar {
191
216
  */
192
217
  value: string;
193
218
  }
219
+ export interface DefinitionsLabel {
220
+ /**
221
+ * The name of the label
222
+ */
223
+ key: string;
224
+ /**
225
+ * The value of the label
226
+ */
227
+ value: string;
228
+ /**
229
+ * Interpreted the value as regex
230
+ */
231
+ isRegex?: boolean;
232
+ }
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
- "author": "Florian Keller <github@floriankeller.de>",
2
+ "author": "Florian Imdahl <git@ffflorian.de>",
3
3
  "dependencies": {},
4
4
  "description": "TypeScript definitions for container-structure-test.",
5
5
  "license": "MIT",
6
6
  "main": "index.d.ts",
7
7
  "name": "@schemastore/container-structure-test",
8
- "repository": "https://github.com/ffflorian/schemastore-updater/tree/master/schemas/container-structure-test",
8
+ "repository": "https://github.com/ffflorian/schemastore-updater/tree/main/schemas/container-structure-test",
9
9
  "scripts": {},
10
- "typesPublisherContentHash": "c3ec903b62f45251b79848dbe09196302776f471a0620861a84a1e9bd8c22fa3",
10
+ "typesPublisherContentHash": "0726f7e25afd55eb3e70027c936cd50ac96e97a4bb8e7a11c689038f75433bab",
11
11
  "types": "index.d.ts",
12
- "version": "0.0.1",
12
+ "version": "0.0.3",
13
13
  "typeScriptVersion": "2.2"
14
14
  }