Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions kubernetes/configmap/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ data:
fastcgi_pass php-upstream;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root/imageResizer.php;
fastcgi_param HTTPS $http_x_forwarded_proto;
fastcgi_param HTTP_HOST $request_host;
fastcgi_param REQUEST_SCHEME $http_x_forwarded_proto;
}

# plain 404 page for missing files accessed via CDN
Expand Down
10 changes: 6 additions & 4 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,28 @@ Tests for verifying Kubernetes manifest generation produces expected output.

```bash
# Run all tests
docker run --rm -v $(pwd):/workspace -w /workspace \
docker run --rm --user "$(id -u):$(id -g)" -v "$(pwd)":/workspace -w /workspace \
shopsys/kubernetes-buildpack:2.0 \
./tests/run-tests.sh

# Run specific scenario
docker run --rm -v $(pwd):/workspace -w /workspace \
docker run --rm --user "$(id -u):$(id -g)" -v "$(pwd)":/workspace -w /workspace \
shopsys/kubernetes-buildpack:2.0 \
./tests/run-tests.sh basic-production

# Update expected files after intentional changes
docker run --rm -v $(pwd):/workspace -w /workspace \
docker run --rm --user "$(id -u):$(id -g)" -v "$(pwd)":/workspace -w /workspace \
shopsys/kubernetes-buildpack:2.0 \
./tests/run-tests.sh --update

# List available scenarios
docker run --rm -v $(pwd):/workspace -w /workspace \
docker run --rm --user "$(id -u):$(id -g)" -v "$(pwd)":/workspace -w /workspace \
shopsys/kubernetes-buildpack:2.0 \
./tests/run-tests.sh --list
```

Using `--user "$(id -u):$(id -g)"` ensures generated files are owned by your local user instead of `root`.

## Options

```
Expand Down
3 changes: 3 additions & 0 deletions tests/scenarios/basic-production/expected/webserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ data:
fastcgi_pass php-upstream;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root/imageResizer.php;
fastcgi_param HTTPS $http_x_forwarded_proto;
fastcgi_param HTTP_HOST $request_host;
fastcgi_param REQUEST_SCHEME $http_x_forwarded_proto;
}

# plain 404 page for missing files accessed via CDN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ data:
fastcgi_pass php-upstream;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root/imageResizer.php;
fastcgi_param HTTPS $http_x_forwarded_proto;
fastcgi_param HTTP_HOST $request_host;
fastcgi_param REQUEST_SCHEME $http_x_forwarded_proto;
}

# plain 404 page for missing files accessed via CDN
Expand Down
3 changes: 3 additions & 0 deletions tests/scenarios/escaping-env/expected/webserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ data:
fastcgi_pass php-upstream;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root/imageResizer.php;
fastcgi_param HTTPS $http_x_forwarded_proto;
fastcgi_param HTTP_HOST $request_host;
fastcgi_param REQUEST_SCHEME $http_x_forwarded_proto;
}

# plain 404 page for missing files accessed via CDN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ data:
fastcgi_pass php-upstream;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root/imageResizer.php;
fastcgi_param HTTPS $http_x_forwarded_proto;
fastcgi_param HTTP_HOST $request_host;
fastcgi_param REQUEST_SCHEME $http_x_forwarded_proto;
}

# plain 404 page for missing files accessed via CDN
Expand Down