Skip to content

Commit

Permalink
run image manager and devmapper tests on containerd runner
Browse files Browse the repository at this point in the history
Signed-off-by: Amory Hoste <[email protected]>
  • Loading branch information
amohoste committed May 16, 2022
1 parent 862a3a4 commit ed85025
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 10 deletions.
77 changes: 69 additions & 8 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
strategy:
fail-fast: false
matrix:
module: [taps, misc, profile, devmapper, networking, snapshotting, ctriface/image]
module: [taps, misc, profile, networking, snapshotting ]
steps:

- name: Set up Go 1.18
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Set up Python 3.x
uses: actions/setup-python@v3
with:
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Install PMU tools
run: ./scripts/install_pmutools.sh

- name: Add rsync # TODO: add dependencies to vHive
- name: Add rsync
run: |
sudo apt update
sudo apt install rsync -y
Expand All @@ -64,12 +64,12 @@ jobs:
run: |
make -C $MODULE test
make -C $MODULE test-man
firecracker-containerd-interface-test:
name: "Unit tests: Firecracker-containerd interface"
runs-on: [self-hosted, integ]
steps:

- name: Set up Go 1.18
uses: actions/setup-go@v3
with:
Expand All @@ -80,16 +80,16 @@ jobs:
sudo add-apt-repository ppa:git-core/ppa -y
sudo apt update
sudo apt install git -y
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
lfs: true

- name: Pull binaries
run: ./scripts/setup_firecracker_containerd.sh

- name: Add rsync # TODO: add dependencies to vHive
- name: Add rsync
run: |
sudo apt update
sudo apt install rsync -y
Expand All @@ -105,3 +105,64 @@ jobs:
- name: Cleaning
if: ${{ always() }}
run: ./scripts/clean_fcctr.sh

containerd-unit-test:
name: Containerd dependent unit test
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
module: [ devmapper, ctriface/image ]
steps:
- name: Set up Go 1.18
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Set up Python 3.x
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Setup System
run: ./scripts/setup_system.sh

- name: Install PMU tools
run: ./scripts/install_pmutools.sh

- name: Add rsync # TODO: add dependencies to vHive
run: |
sudo apt update
sudo apt install rsync -y
- name: Setup firecracker containerd
run: ./scripts/setup_firecracker_containerd.sh

- name: Setup containerd
run: |
wget --continue --quiet https://github.com/containerd/containerd/releases/download/v1.5.7/containerd-1.5.7-linux-amd64.tar.gz
sudo tar -C /usr/local -xzf containerd-1.5.7-linux-amd64.tar.gz
- name: Create devmapper
run: ./scripts/create_devmapper.sh

- name: Run containerd
run: sudo containerd &

- name: Run firecracker-containerd
run: sudo /usr/local/bin/firecracker-containerd --config /etc/firecracker-containerd/config.toml &

- name: Build
run: go build -race -v -a ./...

- name: Run tests in submodules
env:
MODULE: ${{ matrix.module }}
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
run: |
make -C $MODULE test
make -C $MODULE test-man
2 changes: 1 addition & 1 deletion ctriface/image/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (
const (
TestImageName = "ghcr.io/ease-lab/helloworld:var_workload"
containerdAddress = "/run/firecracker-containerd/containerd.sock"
NamespaceName = "firecracker-containerd"
NamespaceName = "containerd"
)

func getAllImages() map[string]string {
Expand Down
2 changes: 1 addition & 1 deletion devmapper/devicemapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (

const (
containerdAddress = "/run/firecracker-containerd/containerd.sock"
NamespaceName = "firecracker-containerd"
NamespaceName = "containerd"
TestImageName = "ghcr.io/ease-lab/helloworld:var_workload"
)

Expand Down

0 comments on commit ed85025

Please sign in to comment.