Fare Testing
===

###### 2020-05-14

These are some rough notes on testing fares on the DIU as described in the
`rules.scm` file.

Overview
---

When the `rules.scm` file is updated with new fares, right now there is an ad-hoc
protocol in place to test.
This involves:

* Packaging the new `rules.scm` file by placing the new `rules.scm` file into the
  `current_config` directory and running `autocfg.sh` that will add an entry to the
  `update_level` database table
* Verifying the `config.tgz` has been downloaded and the `rules.scm` file is installed on the DIU
* Stepping through various entries in time and testing fare media to ensure proper rejection and acceptance

Everything should be tested in the development environment before pushing to production.


DIU Testing
---

Once the `rules.scm` file has been installed on the DIU, the new rule should be tested.

First we have to turn off time synchronization.
On the Raspberry Pi, this is done through:

```
systemctl stop systemd-timesyncd.service
```

We can then verify we can change the date:

```
date +'%Y%m%d' -s '20200101' ; sleep 5 ; date
20200101
Wed 01 Jan 2020 12:00:05 AM EST
```


