From Fedora Project Wiki

No edit summary
Line 3: Line 3:
|setup=
|setup=
# Boot into the machine/VM you wish to test.
# Boot into the machine/VM you wish to test.
# Install {{command|thermstat-0.6.0-12.fc19}} and {{command|thermstat-webapp-0.6.0-12.fc19}} via: {{command|yum install thermostat thermostat-webapp}}.
# If thermostat-webapp is not yet installed, install it.
|actions=
|actions=
# Start thermostat storage: {{command|thermostat storage --start &}}
# Start thermostat storage: {{command|thermostat storage --start}}
# Start web storage webapp via the tomcat service: {{command|sudo systemctl start tomcat.service}}
# Open /etc/tomcat/tomcat.conf with your favourite text editor as root and add the following JAVA_OPTS line: JAVA_OPTS="-DTHERMOSTAT_HOME=/usr/share/thermostat -Djava.security.auth.login.config=/etc/thermostat/thermostat_jaas.conf"
# Start the Thermostat web storage webapp via the tomcat service: {{command|sudo systemctl start tomcat.service}}.
# 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.
# Start the thermostat agent, connecting to webstorage: {{command|thermostat agent -d http://127.0.0.1:8080/thermostat/storage -u agent-tester -p tester}}
# 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. Then add a line: "agent-tester=thermostat-agent" and "client-tester=thermostat-client"
# Set connection settings for the thermostat agent. Create a file ~/.thermostat/agent/agent.auth with the following contents: <pre>username=agent-tester <newline>password=tester</pre>
# Start the thermostat agent, connecting to webstorage: {{command|thermostat agent -d http://127.0.0.1:8080/thermostat/storage}}
# Start thermostat swing client: {{command|thermostat gui}}
# Start thermostat swing client: {{command|thermostat gui}}
# 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".
Line 14: Line 19:
# Start the swing client again: {{command|thermostat gui}}
# Start the swing client again: {{command|thermostat gui}}
|results=
|results=
# Agent and client should be able to connect fine to http:// URLs. No WARNING messages should appear 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...".
}}
}}

Revision as of 10:46, 22 May 2013

Description

This test case tests whether thermostat agent/gui can be used with web storage (no https setup required).

Setup

  1. Boot into the machine/VM you wish to test.
  2. If thermostat-webapp is not yet installed, install it.

How to test

  1. Start thermostat storage: thermostat storage --start
  2. Open /etc/tomcat/tomcat.conf with your favourite text editor as root and add the following JAVA_OPTS line: JAVA_OPTS="-DTHERMOSTAT_HOME=/usr/share/thermostat -Djava.security.auth.login.config=/etc/thermostat/thermostat_jaas.conf"
  3. Start the Thermostat web storage webapp via the tomcat service: sudo systemctl start tomcat.service.
  4. Make sure that tomcat is running. You can visit http://127.0.0.1:8080 which should show the tomcat start page.
  5. 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:
    1. Open /etc/thermostat/thermostat-users.properties and add the lines: "agent-tester = tester" and "client-tester = tester"
    2. Open /etc/thermostat/thermostat-roles.properties and uncomment the lines which define the "thermostat-agent" recursive role. Then add a line: "agent-tester=thermostat-agent" and "client-tester=thermostat-client"
  6. Set connection settings for the thermostat agent. Create a file ~/.thermostat/agent/agent.auth with the following contents:
    username=agent-tester <newline>password=tester
  7. Start the thermostat agent, connecting to webstorage: thermostat agent -d http://127.0.0.1:8080/thermostat/storage
  8. Start thermostat swing client: thermostat gui
  9. 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", use client-tester as "User Name" and tester as "Password". Check "Save Entitlements".
  10. Click OK and close the swing client.
  11. Start the swing client again: thermostat gui

Expected Results

  1. 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...".