Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding test case for checking the API endpoints of resin-supervisor #77

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Change log
-----------

* Adding test case for checking the API endpoints of resin-supervisor [Horia]
* Add test case to check that the device does not return the resin-vpn IP address [Horia]
* Fix keyword that checks fingerprint file to work with 1.X resin image version [Horia]
* Change Run Process to Run Buffered Process that logs stdout and stdin to a file instead of a PIPE [Praneeth]
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM resin/nuc-node:6-20161215
RUN apt-get update && apt-get install -y qemu-system-x86 rsync qemu-kvm minicom libftdi-dev python-pip && \
rm -rf /var/lib/apt/lists/* && \
pip install --upgrade pip && \
pip install robotframework==3.0 requests==2.4.3 robotframework-requests==0.4.5 pylibftdi==0.15.0 && \
pip install robotframework==3.0.2 requests==2.4.3 robotframework-requests==0.4.5 pylibftdi==0.15.0 && \
npm install --global [email protected] && \
git clone --depth 1 --branch v1.0.0-beta.18 https://github.com/resin-io/etcher.git && cd /etcher && \
npm install --production && \
Expand Down
34 changes: 19 additions & 15 deletions qemu.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Preparing test environment
Set Suite Variable ${image} %{image}
File Should Exist ${image} msg="Provided images file does not exist"
Set Suite Variable ${application_repo} https://github.com/resin-io/autohat-ondevice.git
Set Suite Variable ${application_commit} 430cbe53d5582a03a503357e7cfde90d3aa8aee2
Set Suite Variable ${application_commit} 370cc57e4dbd1fa5fcfd9b8faa599d0c717ea8ea
Resin login with email "%{email}" and password "%{password}"
${create_application} = Get Environment Variable CREATE_APPLICATION default=True
Set Suite Variable ${create_application} ${create_application}
Expand All @@ -27,13 +27,13 @@ Deleting application if it already exists
Run Keyword If '${create_application}' == 'True' Force delete application "${application_name}"
Creating application
Run Keyword If '${create_application}' == 'True' Create application "${application_name}" with device type "${device_type}"
Checking host OS fingerprint file on resin-boot partition
Check host OS fingerprint file in "${image}" on "boot" partition
Checking host OS fingerprint file on resin-root partition
Check host OS fingerprint file in "${image}" on "root" partition
Getting host OS version of the image
${return_os_version} = Get host OS version of "${image}"
Set Suite Variable ${os_version} ${return_os_version}
# Checking host OS fingerprint file on resin-boot partition
# Check host OS fingerprint file in "${image}" on "boot" partition
# Checking host OS fingerprint file on resin-root partition
# Check host OS fingerprint file in "${image}" on "root" partition
# Getting host OS version of the image
# ${return_os_version} = Get host OS version of "${image}"
# Set Suite Variable ${os_version} ${return_os_version}
Enabling getty service on the image
Enable getty service on "${image}" for "${device_type}"
Configuring image with application
Expand All @@ -47,23 +47,27 @@ Checking if device comes online in 60s (Trying every 10s)
Git pushing to application
Git clone "${application_repo}" "/tmp/${application_name}"
Git checkout "${application_commit}" "/tmp/${application_name}"
Git push "/tmp/${application_name}" to application "${application_name}"
Git push "/tmp/${application_name}" to application "${application_name}" ""
Checking if device is running the pushed application (Tries for 300 s)
Wait Until Keyword Succeeds 30x 10s Device "${device_uuid}" log should contain "Hello"
Checking that the device does not return the resin-vpn IP address
Check that "${device_uuid}" does not return "resin-vpn" IP address through API using socket "unix\#/tmp/console.sock"
Providing a device to the application with delta already enabled
Run "${image}" on "${application_name}" with delta already enabled
Checking if kernel module loading works
Check if kernel module loading works on "${device_uuid}"
Checking API endpoints of resin-supervisor
Identify device "10565674e65b612be144d3819dd17e16805f2dc053bef19a83c637414e7993"
Check if device "10565674e65b612be144d3819dd17e16805f2dc053bef19a83c637414e7993" reboots
# Check API endpoints of resin-supervisor
# Checking if kernel module loading works
# Check if kernel module loading works on "${device_uuid}"
#Checking delta to a running supervisor
# Check enabling supervisor delta on "${application_name}"
Checking if resin sync works
Check if resin sync works on "${device_uuid}"
Checking if setting environment variable works
Check if setting environment variables works on "${application_name}"
Checking if host OS version of the image is same through resin cli
Check if host OS version of device "${device_uuid}" is "${os_version}"
# Checking if setting environment variable works
# Check if setting environment variables works on "${application_name}"
# Checking if host OS version of the image is same through resin cli
# Check if host OS version of device "${device_uuid}" is "${os_version}"
Waiting till Qemu is killed or 30 seconds
Shutdown resin device "${device_uuid}"
Wait Until Keyword Succeeds 6x 5s Device "${device_uuid}" is offline
Expand Down
Loading