From Fedora Project Wiki
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
|actions= | |actions= | ||
# Start thermostat storage: {{command|thermostat storage --start}} | # Start thermostat storage: {{command|thermostat storage --start}} | ||
# | # Deploy the Thermostat web storage webapp via the tomcat service: {{command|sudo systemctl start tomcat@thermostat}}. | ||
# Make sure that tomcat is running. You can visit http://127.0.0.1:8080 which should show the tomcat start page. | # Make sure that tomcat is running. You can visit http://127.0.0.1:8080 which should show the tomcat start page. | ||
# Configure a thermostat user and associated roles. In this case we add a user called "agent-tester" with password "tester" and give it roles required for an agent user: | # Configure a thermostat user and associated roles. In this case we add a user called "agent-tester" with password "tester" and give it roles required for an agent user: | ||
## Open /etc/thermostat/thermostat-users.properties and add the lines: "agent-tester = tester" and "client-tester = tester" | ## Open /etc/thermostat/thermostat-users.properties and add the lines: "agent-tester = tester" and "client-tester = tester" | ||
## Open /etc/thermostat/thermostat-roles.properties and uncomment the lines which define the "thermostat-agent" recursive role. Do the same for the "thermostat-client" recursive role. Then add a line: "agent-tester=thermostat-agent" and "client-tester=thermostat-client". | ## Open /etc/thermostat/thermostat-roles.properties and uncomment the lines which define the "thermostat-agent" recursive role. Do the same for the "thermostat-client" recursive role. Then add a line: "agent-tester=thermostat-agent" and "client-tester=thermostat-client". | ||
# Set connection settings for the thermostat agent. Create a file ~/.thermostat/ | # Set connection settings for the thermostat agent. Create a file ~/.thermostat/etc/agent.auth with the following contents: | ||
<pre> | <pre> | ||
username=agent-tester | username=agent-tester | ||
Line 21: | Line 20: | ||
# Change client preferences in order to connect to web storage. Edit => Client Preferences. Enter {{filename|http://127.0.0.1:8080/thermostat/storage}} as "Storage Url", use {{filename|client-tester}} as "User Name" and {{filename|tester}} as "Password". Check "Save Entitlements". | # Change client preferences in order to connect to web storage. Edit => Client Preferences. Enter {{filename|http://127.0.0.1:8080/thermostat/storage}} as "Storage Url", use {{filename|client-tester}} as "User Name" and {{filename|tester}} as "Password". Check "Save Entitlements". | ||
# Click OK and close the swing client. | # Click OK and close the swing client. | ||
# Start the swing client again: {{command|thermostat gui}} | # Start the swing client again in order for new preferences to take effect: {{command|thermostat gui}} | ||
|results= | |results= | ||
# Agent and client should be able to connect fine to http:// URLs. No WARNING messages should appear in the logs and no exceptions should be thrown. You can check that at least one agent is listed via: "View" => "View all agents...". | # Agent and client should be able to connect fine to http:// URLs. No WARNING messages should appear in the logs and no exceptions should be thrown. You can check that at least one agent is listed via: "View" => "View all agents...". | ||
# Tomcat has created a log file with thermostat web service log messages in it at /usr/share/tomcat/logs/thermostat-web-storage.YYYY-MM-DD.log, Where YYYY is the current year, MM the current month and DD the current day. | # Tomcat has created a log file with thermostat web service log messages in it at /usr/share/tomcat/logs/thermostat-web-storage.YYYY-MM-DD.log, Where YYYY is the current year, MM the current month and DD the current day. This file and file catalina.out in /usr/share/tomcat/logs may give you clues as to what is wrong if things go wrong. | ||
}} | }} |
Latest revision as of 17:28, 28 November 2013
Description
This test case tests whether thermostat agent/gui can be used with web storage (no https setup required).
Setup
- Boot into the machine/VM you wish to test.
- If thermostat-webapp is not yet installed, install it.
How to test
- Start thermostat storage:
thermostat storage --start
- Deploy the Thermostat web storage webapp via the tomcat service:
sudo systemctl start tomcat@thermostat
. - Make sure that tomcat is running. You can visit http://127.0.0.1:8080 which should show the tomcat start page.
- Configure a thermostat user and associated roles. In this case we add a user called "agent-tester" with password "tester" and give it roles required for an agent user:
- Open /etc/thermostat/thermostat-users.properties and add the lines: "agent-tester = tester" and "client-tester = tester"
- Open /etc/thermostat/thermostat-roles.properties and uncomment the lines which define the "thermostat-agent" recursive role. Do the same for the "thermostat-client" recursive role. Then add a line: "agent-tester=thermostat-agent" and "client-tester=thermostat-client".
- Set connection settings for the thermostat agent. Create a file ~/.thermostat/etc/agent.auth with the following contents:
username=agent-tester password=tester
- Start the thermostat agent, connecting to webstorage:
thermostat agent -d http://127.0.0.1:8080/thermostat/storage
- Start thermostat swing client:
thermostat gui
- Change client preferences in order to connect to web storage. Edit => Client Preferences. Enter
http://127.0.0.1:8080/thermostat/storage
as "Storage Url", useclient-tester
as "User Name" andtester
as "Password". Check "Save Entitlements". - Click OK and close the swing client.
- Start the swing client again in order for new preferences to take effect:
thermostat gui
Expected Results
- Agent and client should be able to connect fine to http:// URLs. No WARNING messages should appear in the logs and no exceptions should be thrown. You can check that at least one agent is listed via: "View" => "View all agents...".
- Tomcat has created a log file with thermostat web service log messages in it at /usr/share/tomcat/logs/thermostat-web-storage.YYYY-MM-DD.log, Where YYYY is the current year, MM the current month and DD the current day. This file and file catalina.out in /usr/share/tomcat/logs may give you clues as to what is wrong if things go wrong.