|
| 1 | +# SSL-Gateway integration tests |
| 2 | + |
| 3 | +This testsuite tests the integration of the SSL-Gateway into a CloudFoundry environment. |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +### Prerequisites |
| 8 | + |
| 9 | +- bosh CLI v2 |
| 10 | +- Ruby |
| 11 | +- CloudFoundry installation |
| 12 | +- a9s ConsulDNS |
| 13 | +- a9s-pg |
| 14 | + |
| 15 | +### Installing |
| 16 | + |
| 17 | +To install the ruby dependencies: |
| 18 | + |
| 19 | +``` |
| 20 | +cd integration-tests |
| 21 | +
|
| 22 | +bundle install |
| 23 | +``` |
| 24 | + |
| 25 | +## Running the tests |
| 26 | + |
| 27 | +Before the testsuite can be run, the appropriate ENV variables must be set |
| 28 | + |
| 29 | +env variables: |
| 30 | +- LOCALHOST_IP *required* - ip of the localhost that runs the testsuite |
| 31 | +- IAAS_CONFIG *required* |
| 32 | +- EXTERNAL_SECRETS *required* |
| 33 | +- OPS_FILE *optional* - if an ops file is required to deploy the SSL-Gateway |
| 34 | +- CF_USERNAME *required* - you need to provide a user for cf |
| 35 | +- CF_PASSWORD *required* |
| 36 | +- CF_ORG *required* - you need to provide a org and space for cf |
| 37 | +- CF_SPACE *required* |
| 38 | + |
| 39 | +the app requires some domains that are registered in you `/etc/hosts` to resolve to |
| 40 | +one of the ssl-gateway nodes. |
| 41 | + |
| 42 | +These domain names need to be set to the following block of env vars. |
| 43 | +- REACHABLE_SSL_BLACKLIST_DOMAIN |
| 44 | +- UNREACHABLE_SSL_BLACKLIST_DOMAIN |
| 45 | +- REACHABLE_BLACKLIST_DOMAIN |
| 46 | +- UNREACHABLE_BLACKLIST_DOMAIN |
| 47 | +- DEFAULT_APP_DOMAIN |
| 48 | +- RANDOM_DOMAIN |
| 49 | + |
| 50 | +E.g. : |
| 51 | +``` |
| 52 | +cat <<EOF |
| 53 | +172.27.2.12 checker.ssltest.com |
| 54 | +172.27.2.12 checker.ssltest2.com |
| 55 | +172.27.2.12 checker.ssltest3.com |
| 56 | +172.27.2.12 checker.ssltest4.com |
| 57 | +172.27.2.12 checker.misterX.com |
| 58 | +172.27.2.12 de.a9sapp.eu |
| 59 | +EOF > /etc/hosts |
| 60 | +
|
| 61 | +export DEFAULT_APP_DOMAIN=de.a9sapp.eu |
| 62 | +export RANDOM_DOMAIN=checker.misterX.com |
| 63 | +export UNREACHABLE_BLACKLIST_DOMAIN=checker.ssltest3.com |
| 64 | +export REACHABLE_BLACKLIST_DOMAIN=checker.ssltest4.com |
| 65 | +export UNREACHABLE_SSL_BLACKLIST_DOMAIN=checker.ssltest2.com |
| 66 | +export REACHABLE_SSL_BLACKLIST_DOMAIN=checker.ssltest.com |
| 67 | +``` |
| 68 | + |
| 69 | +(It doesnt matter which domain is assigned to which env var) |
| 70 | + |
| 71 | +Then you need to make the domains accessable to the CloudFoundry org you specified in |
| 72 | +CF_ORG. |
| 73 | + |
| 74 | +``` |
| 75 | +cf login |
| 76 | +
|
| 77 | +cf target -o $CF_ORG -s $CF_SPACE |
| 78 | +
|
| 79 | +cf create-domain $CF_ORG $DEFAULT_APP_DOMAIN |
| 80 | +cf create-domain $CF_ORG $RANDOM_DOMAIN |
| 81 | +cf create-domain $CF_ORG $UNREACHABLE_BLACKLIST_DOMAIN |
| 82 | +cf create-domain $CF_ORG $REACHABLE_BLACKLIST_DOMAIN |
| 83 | +cf create-domain $CF_ORG $UNREACHABLE_SSL_BLACKLIST_DOMAIN |
| 84 | +cf create-domain $CF_ORG $REACHABLE_SSL_BLACKLIST_DOMAIN |
| 85 | +``` |
| 86 | + |
| 87 | +To run the testsuite |
| 88 | + |
| 89 | +``` |
| 90 | +cd integration-tests |
| 91 | +
|
| 92 | +rspec |
| 93 | +``` |
| 94 | + |
| 95 | +## Built With |
| 96 | + |
| 97 | +* [RSpec](http://rspec.info) |
| 98 | + |
| 99 | +## Authors |
| 100 | + |
| 101 | +* **Dennis Groß** - *Initial work* - [gdenn](https://github.com/gdenn) |
| 102 | + |
| 103 | +## License |
| 104 | + |
| 105 | +This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details |
0 commit comments