Skip to content

Commit

Permalink
Add tests for nginx 1.25.
Browse files Browse the repository at this point in the history
  • Loading branch information
reynoldsalec committed Dec 5, 2023
1 parent d5da5ed commit 4f2bf96
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pr-nginx-tests.yml
Expand Up @@ -27,6 +27,7 @@ jobs:
- examples/1.22
- examples/1.23
- examples/1.24
- examples/1.25
- examples/custom

steps:
Expand Down
11 changes: 11 additions & 0 deletions examples/1.25/.lando.yml
@@ -0,0 +1,11 @@
name: lando-nginx-125
services:
defaults:
type: nginx:1.25
build_as_root:
- apt-get update && apt-get install -y curl

# This is important because it lets lando know to test against the plugin in this repo
# DO NOT REMOVE THIS!
plugins:
"@lando/nginx": ./../../
44 changes: 44 additions & 0 deletions examples/1.25/README.md
@@ -0,0 +1,44 @@
nginx Example
=============

This example exists primarily to test the following documentation:

* [nginx Service](https://docs.devwithlando.io/tutorials/nginx.html)

Start up tests
--------------

Run the following commands to get up and running with this example.

```bash
# Should start up successfully
lando poweroff
lando start
```

Verification commands
---------------------

Run the following commands to validate things are rolling as they should.

```bash
# Should use 1.25.x as the default version
lando ssh -s defaults -c "nginx -v 2>&1 | grep 1.25"

# Should serve from the app root by default
lando ssh -s defaults -c "curl http://localhost | grep ROOTDIR"

# Should only serve over http by default
lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 1
```

Destroy tests
-------------

Run the following commands to trash this app like nothing ever happened.

```bash
# Should be destroyed with success
lando destroy -y
lando poweroff
```
1 change: 1 addition & 0 deletions examples/1.25/index.html
@@ -0,0 +1 @@
ROOTDIR

0 comments on commit 4f2bf96

Please sign in to comment.