Skip to content

Commit 0ab8035

Browse files
authored
fix: e2e tests (#143)
Issue #, if available: *Description of changes:* - Fixes e2e tests by restarting BuildKit when containerd is restarted (similar issue faced in runfinch/finch#461) - Uses a more up to date yaml file for testing (will automatically update the OS version too since that's included in the makefile) *Testing done:* - [x] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Signed-off-by: Justin Alvarez <[email protected]>
1 parent 88a947c commit 0ab8035

File tree

6 files changed

+98
-270
lines changed

6 files changed

+98
-270
lines changed

.github/workflows/ci.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,19 @@ jobs:
2626
os: [[self-hosted, macos, amd64, 13, test], [self-hosted, macos, amd64, 12, test], [self-hosted, macos, arm64, 13, test], [self-hosted, macos, arm64, 12, test]]
2727
runs-on: ${{ matrix.os }}
2828
steps:
29-
- uses: actions/checkout@v3
29+
- name: Checkout code
30+
uses: actions/checkout@v3
3031
with:
3132
fetch-depth: 0
3233
persist-credentials: false
3334
submodules: true
34-
- uses: actions/setup-go@v4
35+
- name: Setup go
36+
uses: actions/setup-go@v4
3537
with:
3638
go-version-file: e2e/go.mod
37-
cache: true
39+
cache-dependency-path: e2e/go.sum
3840
- name: Clean up previous files
41+
shell: zsh {0}
3942
run: |
4043
sudo rm -rf ~/.lima
4144
sudo rm -rf ./_output
@@ -45,11 +48,17 @@ jobs:
4548
if pgrep '^socket_vmnet'; then
4649
sudo pkill '^socket_vmnet'
4750
fi
51+
- name: Install dependencies
52+
shell: zsh {0}
53+
run: brew install go lz4 automake autoconf libtool
4854
- name: Build project
55+
shell: zsh {0}
4956
run: |
5057
export PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH"
5158
which libtool
5259
# Install socket_vmnet to `_output/bin` which is used in $PATH
5360
SOCKET_VMNET_TEMP_PREFIX=$(pwd)/_output/ make lima-socket-vmnet
54-
make install.lima-dependencies
55-
- run: make test-e2e
61+
make install.lima-dependencies binaries
62+
- name: Run e2e tests
63+
shell: zsh {0}
64+
run: make test-e2e

e2e/e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func TestE2e(t *testing.T) {
3838
t.Fatalf("failed to get the current working directory: %v", err)
3939
}
4040
subject := "limactl"
41-
vmConfigFile := filepath.Join(wd, "./fedora.yaml")
41+
vmConfigFile := filepath.Join(wd, "./../_output/lima-template/fedora.yaml")
4242
vmName := "fedora"
4343
o, err := option.New([]string{subject})
4444

e2e/fedora.yaml

Lines changed: 0 additions & 191 deletions
This file was deleted.

e2e/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.20
55
require (
66
github.com/onsi/ginkgo/v2 v2.11.0
77
github.com/onsi/gomega v1.27.10
8-
github.com/runfinch/common-tests v0.7.1
8+
github.com/runfinch/common-tests v0.7.2
99
)
1010

1111
require (

e2e/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
2020
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
2121
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2222
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
23-
github.com/runfinch/common-tests v0.7.1 h1:MQP1W9n6T6OlZu32uw3efZzdztxj1F4Qa/weKf5Was0=
24-
github.com/runfinch/common-tests v0.7.1/go.mod h1:gweXGeZvwD+YZujYhe12bIXrY8bWQy/43N+GRmZM5I4=
23+
github.com/runfinch/common-tests v0.7.2 h1:LYZkxcFpcsoS4ZiXZ5l4aInncmKere+s5SB89QoJx28=
24+
github.com/runfinch/common-tests v0.7.2/go.mod h1:gweXGeZvwD+YZujYhe12bIXrY8bWQy/43N+GRmZM5I4=
2525
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
2626
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
2727
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=

0 commit comments

Comments
 (0)