Skip to content

Provide Unit Test For Migrating Images Feature (#30) #2

Provide Unit Test For Migrating Images Feature (#30)

Provide Unit Test For Migrating Images Feature (#30) #2

Workflow file for this run

name: Test disko
on:
push:
branches: [ "main" ]
jobs:
TestStatistic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Installing requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: install kind cluster
run: |
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
cat > kind_install.yaml <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: cluster1
nodes:
- role: control-plane
image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
- role: worker
image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
- role: worker
image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
- role: worker
image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
EOF
cat kind_install.yaml
kind create cluster --config kind_install.yaml
- name: Run test test statistic
run: |
pytest test_statistic.py
echo "✅ Statistic test was completed successfully!"
TestCopyImages:
runs-on: ubuntu-latest
env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Installing requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run test copy images
run: |
pytest test_copy_image.py
echo "✅ Copy images test was completed successfully!"
TestClusterMirgation:
runs-on: ubuntu-latest
env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Installing requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run test cluster mirgation
run: |
pytest test_cluster_migration.py
echo "✅ Copy images test was completed successfully!"