Skip to content

Commit 6b7eb03

Browse files
committed
Strict patch
1 parent 314d845 commit 6b7eb03

File tree

10 files changed

+598
-68
lines changed

10 files changed

+598
-68
lines changed

.github/workflows/build-snap.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
name: Build and test MicroK8s snap
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
8-
branches:
9-
- master
4+
- pull_request
5+
- push
106

117
jobs:
128
build:
@@ -60,7 +56,7 @@ jobs:
6056
path: build
6157
- name: Running upgrade path test
6258
run: |
63-
sudo -E UPGRADE_MICROK8S_FROM=latest/edge UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade-path.py
59+
sudo -E UPGRADE_MICROK8S_FROM=latest/edge/strict UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade-path.py
6460
6561
test-addons-core:
6662
name: Test core addons
@@ -83,13 +79,15 @@ jobs:
8379
with:
8480
name: microk8s.snap
8581
path: build
86-
- name: Running addons tests
82+
- name: Running addons tests in strict mode
8783
run: |
8884
set -x
89-
sudo snap install build/microk8s.snap --classic --dangerous
85+
sudo snap install build/microk8s.snap --dangerous
86+
sudo ./tests/connect-all-interfaces.sh
87+
sudo microk8s status --wait-ready --timeout 300
9088
./tests/smoke-test.sh
9189
export UNDER_TIME_PRESSURE="True"
92-
export SKIP_PROMETHEUS="False"
90+
export STRICT="yes"
9391
sudo -E bash -c "cd /var/snap/microk8s/common/addons/core/tests; pytest -s -ra test-addons.py"
9492
9593
test-addons-community:
@@ -117,7 +115,11 @@ jobs:
117115
run: |
118116
set -x
119117
sudo snap install build/microk8s.snap --classic --dangerous
118+
sudo ./tests/connect-all-interfaces.sh
119+
sudo microk8s status --wait-ready --timeout 300
120120
sudo microk8s enable community
121+
export UNDER_TIME_PRESSURE="True"
122+
export STRICT="yes"
121123
sudo -E bash -c "cd /var/snap/microk8s/common/addons/community/tests; pytest -s -ra test-addons.py"
122124
123125
test-addons-core-upgrade:
@@ -145,4 +147,5 @@ jobs:
145147
run: |
146148
set -x
147149
export UNDER_TIME_PRESSURE="True"
148-
sudo -E bash -c "UPGRADE_MICROK8S_FROM=latest/edge UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade.py"
150+
export STRICT="yes"
151+
sudo -E bash -c "UPGRADE_MICROK8S_FROM=latest/edge/strict UPGRADE_MICROK8S_TO=$PWD/build/microk8s.snap pytest -s ./tests/test-upgrade.py"

docs/build.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,16 @@ lxc file pull test-build/root/microk8s/microk8s_v1.9.6_amd64.snap .
8383
After copying it, you can install it with:
8484

8585
```shell
86-
snap install microk8s_*_amd64.snap --classic --dangerous
86+
sudo snap install microk8s_latest_amd64.snap --dangerous
8787
```
8888

89+
Finally, you need to connect the interfaces. To this end you can use the `connect-all-interfaces.sh` under the `tests` directory:
90+
91+
```shell
92+
sudo tests/connect-all-interfaces.sh
93+
```
94+
95+
8996
## Assembling the Calico CNI manifest
9097

9198
The calico CNI manifest can be found under `upgrade-scripts/000-switch-to-calico/resources/calico.yaml`.

scripts/wrappers/common/cluster/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def try_set_file_permissions(file):
2929

3030
os.chmod(file, 0o660)
3131
try:
32-
shutil.chown(file, group="microk8s")
32+
shutil.chown(file, group="snap_microk8s")
3333
except LookupError:
3434
# not setting the group means only the current user can access the file
3535
pass

0 commit comments

Comments
 (0)