Skip to content

Commit

Permalink
Run Container Structure Tests
Browse files Browse the repository at this point in the history
Signed-off-by: d-kuro <[email protected]>
  • Loading branch information
d-kuro committed Jun 21, 2023
1 parent 9ada83d commit b059e1d
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-mysql-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ jobs:
ghcr.io/cybozu-go/moco/mysql:${{ env.TAG }}
ghcr.io/cybozu-go/moco/mysql:${{ matrix.mysql-version }}
- name: Install Container Structure Tests
run: |
VERSION=v1.15.0
curl -LO "https://storage.googleapis.com/container-structure-test/$VERSION/container-structure-test-linux-amd64" \
&& chmod +x container-structure-test-linux-amd64 \
&& sudo mv container-structure-test-linux-amd64 /usr/local/bin/container-structure-test
- name: Run Container Structure Tests
run: |
container-structure-test test --image ghcr.io/cybozu-go/moco/mysql:${{ matrix.mysql-version }} --config ./containers/mysql/${{ matrix.mysql-version }}/container-structure-test.yaml
- name: Create kind cluster
run: kind create cluster --name=moco --config=./e2e/kind-config_actions.yaml --image=kindest/node:v${{ matrix.k8s-version }} --wait 1m

Expand Down
15 changes: 15 additions & 0 deletions containers/mysql/8.0.18/container-structure-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
schemaVersion: '2.0.0'
fileExistenceTests:
- name: 'mysqld'
path: '/usr/local/mysql/bin/mysqld'
shouldExist: true
isExecutableBy: 'owner'
- name: 'mysql lib'
path: '/usr/local/mysql/lib'
shouldExist: true
- name: 'mysql share'
path: '/usr/local/mysql/share'
shouldExist: true
- name: 'mysql LICENSE'
path: '/usr/local/mysql/LICENSE'
shouldExist: true
15 changes: 15 additions & 0 deletions containers/mysql/8.0.25/container-structure-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
schemaVersion: '2.0.0'
fileExistenceTests:
- name: 'mysqld'
path: '/usr/local/mysql/bin/mysqld'
shouldExist: true
isExecutableBy: 'owner'
- name: 'mysql lib'
path: '/usr/local/mysql/lib'
shouldExist: true
- name: 'mysql share'
path: '/usr/local/mysql/share'
shouldExist: true
- name: 'mysql LICENSE'
path: '/usr/local/mysql/LICENSE'
shouldExist: true
15 changes: 15 additions & 0 deletions containers/mysql/8.0.26/container-structure-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
schemaVersion: '2.0.0'
fileExistenceTests:
- name: 'mysqld'
path: '/usr/local/mysql/bin/mysqld'
shouldExist: true
isExecutableBy: 'owner'
- name: 'mysql lib'
path: '/usr/local/mysql/lib'
shouldExist: true
- name: 'mysql share'
path: '/usr/local/mysql/share'
shouldExist: true
- name: 'mysql LICENSE'
path: '/usr/local/mysql/LICENSE'
shouldExist: true
15 changes: 15 additions & 0 deletions containers/mysql/8.0.27/container-structure-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
schemaVersion: '2.0.0'
fileExistenceTests:
- name: 'mysqld'
path: '/usr/local/mysql/bin/mysqld'
shouldExist: true
isExecutableBy: 'owner'
- name: 'mysql lib'
path: '/usr/local/mysql/lib'
shouldExist: true
- name: 'mysql share'
path: '/usr/local/mysql/share'
shouldExist: true
- name: 'mysql LICENSE'
path: '/usr/local/mysql/LICENSE'
shouldExist: true

0 comments on commit b059e1d

Please sign in to comment.