|
1 | 1 | import { DepGraph } from "@snyk/dep-graph"; |
2 | 2 | import * as plugin from "../../lib"; |
3 | | -import * as subProcess from "../../lib/sub-process"; |
4 | 3 | import { getFixture } from "../util"; |
5 | 4 |
|
6 | 5 | describe("plugin", () => { |
@@ -92,35 +91,6 @@ describe("plugin", () => { |
92 | 91 | }); |
93 | 92 | }); |
94 | 93 |
|
95 | | - describe("when scanning a locally loaded image", () => { |
96 | | - const imageName = "busybox"; |
97 | | - const imageTag = "latest"; |
98 | | - const imageNameWithTag = `${imageName}:${imageTag}`; |
99 | | - |
100 | | - beforeAll(async () => { |
101 | | - const fixturePath = getFixture([ |
102 | | - "../fixtures/docker-archives", |
103 | | - "skopeo-copy/busybox.tar", |
104 | | - ]); |
105 | | - await subProcess.execute("docker", ["load", "--input", fixturePath]); |
106 | | - }, 10000); // 10s timeout for loading image |
107 | | - |
108 | | - afterAll(async () => { |
109 | | - await subProcess.execute("docker", ["rmi", imageNameWithTag]); |
110 | | - }); |
111 | | - |
112 | | - test("should successfully scan a local image loaded from a tar archive", async () => { |
113 | | - const pluginResult = await plugin.scan({ path: imageNameWithTag }); |
114 | | - const depGraph: DepGraph = pluginResult.scanResults[0].facts.find( |
115 | | - (fact) => fact.type === "depGraph", |
116 | | - )!.data; |
117 | | - |
118 | | - expect(depGraph.rootPkg.name).toEqual(`docker-image|${imageName}`); |
119 | | - expect(depGraph.rootPkg.version).toEqual(imageTag); |
120 | | - expect(pluginResult.scanResults[0].identity.type).toEqual("linux"); |
121 | | - }); |
122 | | - }); |
123 | | - |
124 | 94 | test("image pulled by tag has version set", async () => { |
125 | 95 | const imageNameAndTag = `nginx:1.19.0`; |
126 | 96 |
|
|
0 commit comments