Skip to content

Commit f62111c

Browse files
committed
Fix failing tests (remove file_count since not consistant)
Signed-off-by: tdruez <[email protected]>
1 parent f30ba23 commit f62111c

File tree

6 files changed

+0
-11
lines changed

6 files changed

+0
-11
lines changed

scanpipe/pipes/docker.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,22 +190,17 @@ def create_codebase_resources(project, image: Image) -> None:
190190
for layer_index, layer in enumerate(image.layers, start=1):
191191
layer_tag = get_layer_tag(image.image_id, layer.layer_id, layer_index)
192192

193-
layer_file_count = 0
194193
for resource in layer.get_resources(with_dir=True):
195194
pipes.make_codebase_resource(
196195
project=project,
197196
location=resource.location,
198197
rootfs_path=resource.path,
199198
tag=layer_tag,
200199
)
201-
if resource.is_file:
202-
layer_file_count += 1
203200

204201
layer_data = layer.to_dict()
205-
layer_data["file_count"] = layer_file_count
206202
layer_data.pop("extracted_location", None)
207203
layer_data.pop("archive_location", None)
208-
209204
pipes.make_codebase_resource(
210205
project=project,
211206
location=str(layer.extracted_location),

scanpipe/tests/data/docker/alpine_3_15_4_scan_codebase.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,6 @@
16551655
"variant": null,
16561656
"layer_id": "40e48c8ef2450e6a9e8d50b846a58ede43f1b01dd351d2bdd7dca14c5c033f20",
16571657
"created_by": "/bin/sh -c #(nop) ADD file:5d673d25da3a14ce1f6cf66e4c7fd4f4b85a3759a9d93efb3fd9ff852b5b56e4 in / ",
1658-
"file_count": 411,
16591658
"os_version": null,
16601659
"architecture": null,
16611660
"docker_version": null,

scanpipe/tests/data/docker/centos_scan_codebase.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191435,7 +191435,6 @@
191435191435
"variant": null,
191436191436
"layer_id": "a10cf747c363a52be048f884c084a25e03280d54a7ac02e17dbd8c5ad160e9bd",
191437191437
"created_by": null,
191438-
"file_count": 25,
191439191438
"os_version": null,
191440191439
"architecture": null,
191441191440
"docker_version": null,

scanpipe/tests/data/docker/debian_scan_codebase.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,6 @@
520520
"variant": null,
521521
"layer_id": "8a63761caf6d45e65b8e6cdc2e0c03c55625fd142ec3356b80a9ea4a34b11b66",
522522
"created_by": "/bin/sh -c #(nop) ADD file:37744639836b248c88f6e126619829290b45c233309538310e8fffb82e98eaf8 in / ",
523-
"file_count": 6,
524523
"os_version": null,
525524
"architecture": null,
526525
"docker_version": null,

scanpipe/tests/data/docker/gcr_io_distroless_base_scan_codebase.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,6 @@
588588
"variant": null,
589589
"layer_id": "cb3279093e638ddfd56bff4d3d89c5a3ed6dd59dbcfbc2f3107045635996b822",
590590
"created_by": "bazel build ...",
591-
"file_count": 457,
592591
"os_version": null,
593592
"architecture": null,
594593
"docker_version": null,
@@ -15731,7 +15730,6 @@
1573115730
"variant": null,
1573215731
"layer_id": "d92879194ba1c23b840306b007bce6568f71f0e954d63625d48504d533749e30",
1573315732
"created_by": "bazel build ...",
15734-
"file_count": 1848,
1573515733
"os_version": null,
1573615734
"architecture": null,
1573715735
"docker_version": null,

scanpipe/tests/data/image-with-symlinks/minitag.tar-expected-scan.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@
169169
"variant": null,
170170
"layer_id": "887ac3b73f9a48d1324380c8d1ef033873a6cb882a5a9170fba51fa69fd5e5f0",
171171
"created_by": "/bin/sh -c #(nop) ADD file:783bda715f24a7fcabfe87ca07ae47e5cca3d35b99dd78e3155748e41477acb2 in / ",
172-
"file_count": 8,
173172
"os_version": null,
174173
"architecture": null,
175174
"docker_version": null,

0 commit comments

Comments
 (0)