Skip to content

Commit ed85025

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

File tree

3 files changed

+71
-10
lines changed

3 files changed

+71
-10
lines changed

.github/workflows/unit_tests.yml

Lines changed: 69 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,64 @@ 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+
- name: Set up Go 1.18
118+
uses: actions/setup-go@v3
119+
with:
120+
go-version: 1.18
121+
122+
- name: Set up Python 3.x
123+
uses: actions/setup-python@v3
124+
with:
125+
python-version: '3.x'
126+
127+
- name: Check out code into the Go module directory
128+
uses: actions/checkout@v3
129+
130+
- name: Setup System
131+
run: ./scripts/setup_system.sh
132+
133+
- name: Install PMU tools
134+
run: ./scripts/install_pmutools.sh
135+
136+
- name: Add rsync # TODO: add dependencies to vHive
137+
run: |
138+
sudo apt update
139+
sudo apt install rsync -y
140+
141+
- name: Setup firecracker containerd
142+
run: ./scripts/setup_firecracker_containerd.sh
143+
144+
- name: Setup containerd
145+
run: |
146+
wget --continue --quiet https://github.com/containerd/containerd/releases/download/v1.5.7/containerd-1.5.7-linux-amd64.tar.gz
147+
sudo tar -C /usr/local -xzf containerd-1.5.7-linux-amd64.tar.gz
148+
149+
- name: Create devmapper
150+
run: ./scripts/create_devmapper.sh
151+
152+
- name: Run containerd
153+
run: sudo containerd &
154+
155+
- name: Run firecracker-containerd
156+
run: sudo /usr/local/bin/firecracker-containerd --config /etc/firecracker-containerd/config.toml &
157+
158+
- name: Build
159+
run: go build -race -v -a ./...
160+
161+
- name: Run tests in submodules
162+
env:
163+
MODULE: ${{ matrix.module }}
164+
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
165+
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
166+
run: |
167+
make -C $MODULE test
168+
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)