Skip to content

Commit 9b3be74

Browse files
vmagrometa-codesync[bot]
authored andcommitted
[antlir2][apt] bring back tests
Summary: These were deleted in D110186663 because the old snapshot aged out, but it's fixed now. Test Plan: ``` ❯ buck2 test fbcode//antlir/antlir2/features/apt/... Buck UI: https://www.internalfb.com/buck2/253fa931-398c-43f5-bab5-9311ccf26a46 Tests finished: Pass 6. Fail 0. Timeout 0. Fatal 0. Skip 0. Omit 0. Infra Failure 0. Build failure 0 ``` https://www.internalfb.com/intern/testinfra/testrun/9570149399046508 Reviewed By: justintrudell Differential Revision: D116816199 fbshipit-source-id: 504cdb0ccd02b2b15b70b1f1502b4b07031c7fa4
1 parent b5b50d0 commit 9b3be74

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

  • antlir/antlir2/features/apt/tests
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
load("//antlir/antlir2/bzl/feature:defs.bzl", "feature")
2+
load("//antlir/antlir2/bzl/image:defs.bzl", "image")
3+
load("//antlir/antlir2/testing:image_debs_test.bzl", "image_test_deb_names")
4+
5+
oncall("antlir")
6+
7+
image.layer(
8+
name = "bash-installed",
9+
default_os = "debian-trixie",
10+
features = [
11+
feature.apt_install(
12+
packages = [
13+
"bash",
14+
"dash",
15+
"dpkg",
16+
]
17+
),
18+
],
19+
)
20+
21+
image_test_deb_names(
22+
name = "test-bash-installed",
23+
layer = ":bash-installed",
24+
names = [
25+
"bash",
26+
"dash",
27+
"dpkg",
28+
],
29+
)
30+
31+
image.layer(
32+
name = "bash-removed",
33+
default_os = "debian-trixie",
34+
features = [
35+
feature.apt_remove(
36+
packages = [
37+
"bash",
38+
]
39+
),
40+
],
41+
parent_layer = ":bash-installed",
42+
)
43+
44+
image_test_deb_names(
45+
name = "test-bash-removed",
46+
layer = ":bash-removed",
47+
names = [
48+
"bash",
49+
],
50+
not_installed = True,
51+
)

0 commit comments

Comments
 (0)