Skip to content

Commit 6c6f752

Browse files
committed
run image manager and devmapper tests on containerd runner
Signed-off-by: Amory Hoste <[email protected]>
1 parent 862a3a4 commit 6c6f752

File tree

3 files changed

+72
-10
lines changed

3 files changed

+72
-10
lines changed

.github/workflows/unit_tests.yml

Lines changed: 70 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
module: [taps, misc, profile, devmapper, networking, snapshotting, ctriface/image]
29+
module: [taps, misc, profile, networking, snapshotting ]
3030
steps:
3131

3232
- name: Set up Go 1.18
3333
uses: actions/setup-go@v3
3434
with:
3535
go-version: 1.18
36-
36+
3737
- name: Set up Python 3.x
3838
uses: actions/setup-python@v3
3939
with:
@@ -48,7 +48,7 @@ jobs:
4848
- name: Install PMU tools
4949
run: ./scripts/install_pmutools.sh
5050

51-
- name: Add rsync # TODO: add dependencies to vHive
51+
- name: Add rsync
5252
run: |
5353
sudo apt update
5454
sudo apt install rsync -y
@@ -64,12 +64,12 @@ jobs:
6464
run: |
6565
make -C $MODULE test
6666
make -C $MODULE test-man
67-
67+
6868
firecracker-containerd-interface-test:
6969
name: "Unit tests: Firecracker-containerd interface"
7070
runs-on: [self-hosted, integ]
7171
steps:
72-
72+
7373
- name: Set up Go 1.18
7474
uses: actions/setup-go@v3
7575
with:
@@ -80,16 +80,16 @@ jobs:
8080
sudo add-apt-repository ppa:git-core/ppa -y
8181
sudo apt update
8282
sudo apt install git -y
83-
83+
8484
- name: Check out code into the Go module directory
8585
uses: actions/checkout@v3
8686
with:
8787
lfs: true
88-
88+
8989
- name: Pull binaries
9090
run: ./scripts/setup_firecracker_containerd.sh
9191

92-
- name: Add rsync # TODO: add dependencies to vHive
92+
- name: Add rsync
9393
run: |
9494
sudo apt update
9595
sudo apt install rsync -y
@@ -105,3 +105,65 @@ jobs:
105105
- name: Cleaning
106106
if: ${{ always() }}
107107
run: ./scripts/clean_fcctr.sh
108+
109+
containerd-unit-test:
110+
name: Containerd dependent unit test
111+
runs-on: ubuntu-20.04
112+
strategy:
113+
fail-fast: false
114+
matrix:
115+
module: [ devmapper, ctriface/image ]
116+
steps:
117+
118+
- name: Set up Go 1.18
119+
uses: actions/setup-go@v3
120+
with:
121+
go-version: 1.18
122+
123+
- name: Set up Python 3.x
124+
uses: actions/setup-python@v3
125+
with:
126+
python-version: '3.x'
127+
128+
- name: Check out code into the Go module directory
129+
uses: actions/checkout@v3
130+
131+
- name: Setup System
132+
run: ./scripts/setup_system.sh
133+
134+
- name: Install PMU tools
135+
run: ./scripts/install_pmutools.sh
136+
137+
- name: Add rsync # TODO: add dependencies to vHive
138+
run: |
139+
sudo apt update
140+
sudo apt install rsync -y
141+
142+
- name: Setup firecracker containerd
143+
run: ./scripts/setup_firecracker_containerd.sh
144+
145+
- name: Setup containerd
146+
run: |
147+
wget --continue --quiet https://github.com/containerd/containerd/releases/download/v1.5.7/containerd-1.5.7-linux-amd64.tar.gz
148+
sudo tar -C /usr/local -xzf containerd-1.5.7-linux-amd64.tar.gz
149+
150+
- name: Create devmapper
151+
run: ./scripts/create_devmapper.sh
152+
153+
- name: Run containerd
154+
run: sudo containerd &
155+
156+
- name: Run firecracker-containerd
157+
run: sudo /usr/local/bin/firecracker-containerd --config /etc/firecracker-containerd/config.toml &
158+
159+
- name: Build
160+
run: go build -race -v -a ./...
161+
162+
- name: Run tests in submodules
163+
env:
164+
MODULE: ${{ matrix.module }}
165+
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
166+
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
167+
run: |
168+
make -C $MODULE test
169+
make -C $MODULE test-man

ctriface/image/manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import (
4040
const (
4141
TestImageName = "ghcr.io/ease-lab/helloworld:var_workload"
4242
containerdAddress = "/run/firecracker-containerd/containerd.sock"
43-
NamespaceName = "firecracker-containerd"
43+
NamespaceName = "containerd"
4444
)
4545

4646
func getAllImages() map[string]string {

devmapper/devicemapper_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import (
4040

4141
const (
4242
containerdAddress = "/run/firecracker-containerd/containerd.sock"
43-
NamespaceName = "firecracker-containerd"
43+
NamespaceName = "containerd"
4444
TestImageName = "ghcr.io/ease-lab/helloworld:var_workload"
4545
)
4646

0 commit comments

Comments
 (0)