-
Notifications
You must be signed in to change notification settings - Fork 1
/
webserver.robot
38 lines (31 loc) · 1.05 KB
/
webserver.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
*** Settings ***
Library SSHLibrary
Library Process
Resource resource.robot
Force Tags webserver
Suite Setup Open Connection And Log In
Suite Teardown Close All Connections
*** Variables ***
*** Test cases ***
Verify Hostname
[Timeout] 30s
Get Hostname
Hostname Is Correct
Verify Nginx
[Timeout] 1m
[Documentation] Nginx is started on boot, so we don't need to start it in the test case.
Check Nginx Is Running
Check Nginx Output
*** Keywords ***
Get Hostname
${HOSTNAME} = Execute Command hostname
Set Test Variable ${HOSTNAME}
Hostname Is Correct
Should Be Equal ${HOSTNAME} raspberrypi
Check Nginx Is Running
${result} = Execute Command systemctl status nginx
Should Contain ${result} Active: active (running)
Check Nginx Output
${result} = Run Process curl ${RPI_IP}
Should Contain ${result.stdout} Welcome to nginx!
Should Contain ${result.stdout} the nginx web server is successfully installed