mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2026-01-08 13:21:37 +00:00
junit report testing
removing ap test, just to speed up report generation attempting to fix test copy issues more speedup continue testing fix testo fixing
This commit is contained in:
33
.github/workflows/nightly.yml
vendored
33
.github/workflows/nightly.yml
vendored
@@ -42,10 +42,10 @@ jobs:
|
||||
run: docker login ${{ env.DOCKER_SERVER }} -u ${{ env.DOCKER_USER_NAME }} -p ${{ env.DOCKER_USER_PASSWORD }}
|
||||
- name: build docker image
|
||||
shell: bash
|
||||
run: docker build -t ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }} -f wlan-testing/docker/Dockerfile .
|
||||
run: docker build -t ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:pytest-${{ github.run_id }} -f wlan-testing/pytest/Dockerfile .
|
||||
- name: push docker image
|
||||
shell: bash
|
||||
run: docker push ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }}
|
||||
run: docker push ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:pytest-${{ github.run_id }}
|
||||
|
||||
cloudsdk:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -100,42 +100,41 @@ jobs:
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build, cloudsdk ]
|
||||
steps:
|
||||
- name: run tests
|
||||
run: |
|
||||
today=$(date +"%d-%m-%Y")
|
||||
aws eks update-kubeconfig --name ${{ env.AWS_EKS_NAME }}
|
||||
kubectl delete job nightly-ci-$today --wait=true --ignore-not-found=true
|
||||
# will be needed for multiple branches at the same time
|
||||
# namespace: ${GITHUB_REF##*/}
|
||||
echo ${GITHUB_REF##*/}
|
||||
|
||||
cat <<EOF | kubectl apply -f -
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: nightly-ci-$today
|
||||
namespace: default
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: tests
|
||||
image: ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }}
|
||||
image: ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:pytest-499077849
|
||||
args:
|
||||
- "--testrail-user-id"
|
||||
- "gleb@opsfleet.com"
|
||||
- "--testrail-user-password"
|
||||
- "${{ env.TESTRAIL_USER_PASSWORD }}"
|
||||
- "--skip-update-firmware"
|
||||
- "-c"
|
||||
- "pytest --no-testrails --skip-update-firmware; echo 'starting sleep'; sleep 300"
|
||||
command: [ "bash" ]
|
||||
imagePullSecrets:
|
||||
- name: tip-docker-registry-key
|
||||
restartPolicy: Never
|
||||
backoffLimit: 0
|
||||
EOF
|
||||
kubectl wait job/nightly-ci-$today --for=condition=complete --timeout=1200s
|
||||
podname=$(kubectl get pods -o name -l job-name=nightly-ci-$today)
|
||||
sleep 120
|
||||
podname=$(kubectl get pods -o name -l job-name=nightly-ci-$today -n default)
|
||||
kubectl cp $podname:/ci/test_everything.xml test_everything.xml -n default
|
||||
kubectl logs $podname
|
||||
# placeholder for now
|
||||
echo "Grafana Link: https://grafana.lab.wlan.tip.build/TO_BE_PROVIDED"
|
||||
echo "Kibana Link: https://kibana.lab.wlan.tip.build/TO_BE_PROVIDED"
|
||||
shell: bash
|
||||
- name: Publish Unit Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v1.7
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: "**/*.xml"
|
||||
@@ -4,13 +4,13 @@ WORKDIR /ci
|
||||
RUN apt update && apt install vim -y && rm -rf /var/lib/apt/lists/*
|
||||
RUN pip3 install requests xlsxwriter pandas pytest
|
||||
|
||||
COPY wlan-lanforge-scripts/py-json/LANforge /ci/LANforge
|
||||
COPY wlan-lanforge-scripts/py-json/realm.py /ci
|
||||
COPY wlan-lanforge-scripts/py-json/generic_cx.py /ci
|
||||
COPY wlan-lanforge-scripts/py-scripts/sta_connect2.py /ci
|
||||
COPY wlan-testing/pytest/conftest.py /ci
|
||||
COPY wlan-testing/pytest/test* /ci
|
||||
COPY wlan-testing/pytest/pytest.ini /ci
|
||||
COPY wlan-testing/pytest/helpers /ci/helpers
|
||||
COPY wlan-lanforge-scripts/py-json/LANforge /ci/LANforge/
|
||||
COPY wlan-lanforge-scripts/py-json/realm.py /ci/
|
||||
COPY wlan-lanforge-scripts/py-json/generic_cx.py /ci/
|
||||
COPY wlan-lanforge-scripts/py-scripts/sta_connect2.py /ci/
|
||||
COPY wlan-testing/pytest/conftest.py /ci/
|
||||
COPY wlan-testing/pytest/test* /ci/
|
||||
COPY wlan-testing/pytest/pytest.ini /ci/
|
||||
COPY wlan-testing/pytest/helpers /ci/helpers/
|
||||
|
||||
ENTRYPOINT [ "pytest" ]
|
||||
|
||||
@@ -137,7 +137,7 @@ def pytest_addoption(parser):
|
||||
help="do not generate testrails tests"
|
||||
)
|
||||
# this has to be the last argument
|
||||
# example: --access-points ECW5410 EA8300-EU
|
||||
# example: --access-points ECW5410 EA8300-EU
|
||||
parser.addoption(
|
||||
"--access-points",
|
||||
nargs="+",
|
||||
|
||||
@@ -21,3 +21,10 @@ lanforge-ethernet-port=eth2
|
||||
|
||||
# Cloud SDK settings
|
||||
sdk-customer-id=2
|
||||
|
||||
markers =
|
||||
featureA: marks tests as slow (deselect with '-m "not slow"')
|
||||
featureB
|
||||
featureC
|
||||
featureD
|
||||
featureE
|
||||
@@ -13,32 +13,47 @@ from sta_connect2 import StaConnect2
|
||||
class Test24ghz(object):
|
||||
@pytest.mark.featureA
|
||||
def test_single_client_wpa2(self, setup_testrails, setup_cloudsdk, update_firmware, instantiate_testrail):
|
||||
lf_config = setup_cloudsdk["LANforge"]
|
||||
radio_config = setup_cloudsdk["24ghz"]
|
||||
pytest.skip("speedup")
|
||||
pass
|
||||
# lf_config = setup_cloudsdk["LANforge"]
|
||||
# radio_config = setup_cloudsdk["24ghz"]
|
||||
|
||||
staConnect = StaConnect2(lf_config["host"], lf_config["port"], debug_ = False)
|
||||
staConnect.sta_mode = 0
|
||||
staConnect.upstream_resource = 1
|
||||
staConnect.upstream_port = lf_config["eth_port"]
|
||||
staConnect.radio = lf_config["radio"]
|
||||
staConnect.runtime_secs = lf_config["runtime_duration"]
|
||||
staConnect.resource = 1
|
||||
staConnect.dut_ssid = radio_config["ssid"]
|
||||
staConnect.dut_passwd = radio_config["password"]
|
||||
staConnect.dut_security = "wpa2"
|
||||
staConnect.station_names = radio_config["station_names"]
|
||||
staConnect.bringup_time_sec = 60
|
||||
staConnect.cleanup_on_exit = True
|
||||
staConnect.setup()
|
||||
staConnect.start()
|
||||
sleep(staConnect.runtime_secs)
|
||||
staConnect.stop()
|
||||
staConnect.cleanup()
|
||||
# staConnect = StaConnect2(lf_config["host"], lf_config["port"], debug_ = False)
|
||||
# staConnect.sta_mode = 0
|
||||
# staConnect.upstream_resource = 1
|
||||
# staConnect.upstream_port = lf_config["eth_port"]
|
||||
# staConnect.radio = lf_config["radio"]
|
||||
# staConnect.runtime_secs = lf_config["runtime_duration"]
|
||||
# staConnect.resource = 1
|
||||
# staConnect.dut_ssid = radio_config["ssid"]
|
||||
# staConnect.dut_passwd = radio_config["password"]
|
||||
# staConnect.dut_security = "wpa2"
|
||||
# staConnect.station_names = radio_config["station_names"]
|
||||
# staConnect.bringup_time_sec = 60
|
||||
# staConnect.cleanup_on_exit = True
|
||||
# staConnect.setup()
|
||||
# staConnect.start()
|
||||
# sleep(staConnect.runtime_secs)
|
||||
# staConnect.stop()
|
||||
# staConnect.cleanup()
|
||||
|
||||
assert staConnect.passes()
|
||||
if setup_testrails > 0:
|
||||
instantiate_testrail.update_testrail(case_id=2835, run_id=setup_testrails, status_id=1, msg="testing")
|
||||
# assert staConnect.passes()
|
||||
# if setup_testrails > 0:
|
||||
# instantiate_testrail.update_testrail(case_id=2835, run_id=setup_testrails, status_id=1, msg="testing")
|
||||
|
||||
@pytest.mark.featureB
|
||||
def test_feature_b(self):
|
||||
pass
|
||||
|
||||
@pytest.mark.featureC
|
||||
def test_feature_c(self):
|
||||
pass
|
||||
|
||||
@pytest.mark.featureD
|
||||
def test_feature_d(self):
|
||||
pass
|
||||
|
||||
@pytest.mark.xfail
|
||||
@pytest.mark.featureE
|
||||
def test_feature_e(self):
|
||||
assert 1 == 0
|
||||
|
||||
Reference in New Issue
Block a user