pdsinterop / test-suites

Test suites for protocols a Personal Data Store may support
https://pdsinterop.org/test-suites/
MIT License
2 stars 11 forks source link

php-solid-server image not working as expected #27

Closed michielbdejong closed 3 years ago

michielbdejong commented 3 years ago

When I run:

loopy:php-solid-server michiel$ HOST=127.0.0.1 composer serve-dev
> ENVIRONMENT=development php -S "${HOST:-localhost}:${PORT:-8080}" -t web/ web/index.php

on my host machine, then all openid-config tests pass except for one http/https detail:

loopy:webid-provider-tests michiel$ SERVER_ROOT=http://localhost:8080 ./node_modules/.bin/jest test/surface/fetch-openid-config.test.ts 
 FAIL  test/surface/fetch-openid-config.test.ts
  ● The server's openid configuration › has the server root as the issuer

    expect(received).toEqual(expected) // deep equality

    Expected: "http://localhost:8080"
    Received: "https://localhost:8080"

      27 | 
      28 |   test("has the server root as the issuer", async () => {
    > 29 |     expect(configObj.issuer).toEqual(SERVER_ROOT);
         |                              ^
      30 |   });
      31 | 
      32 |   test("announces a jwks_uri", async () => {

      at test/surface/fetch-openid-config.test.ts:29:30
      at step (test/surface/fetch-openid-config.test.ts:33:23)
      at Object.next (test/surface/fetch-openid-config.test.ts:14:53)
      at test/surface/fetch-openid-config.test.ts:8:71
      at __awaiter (test/surface/fetch-openid-config.test.ts:4:12)
      at Object.<anonymous> (test/surface/fetch-openid-config.test.ts:28:45)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 4 skipped, 12 passed, 17 total
Snapshots:   0 total
Time:        1.214 s, estimated 2 s

But I can't get the same result when running the php-solid-server docker image from this repo. I tried both in the testnet and on https://localhost/. I get the "Hello, World!" message on / but the /.well-known/openid-configuration endpoint is a 404 somehow. I checked the git version in /app inside the container and it's really at the latest dev branch, and all the code is there. But it's somehow not behaving in the same way as on my host machine.

michielbdejong commented 3 years ago

Aah, i think maybe apache is looking for a file at /app/web/.well-known/openid-configuration instead of using /app/web/index.php for everything

Potherca commented 3 years ago

I was assisting @ylebre earlier this week with Docker and the standalone server. I think the Docker (and/or docker-compose) in that repo need another overhaul. Discrepancies have slipped in, between the docs, the PHP code and the HTTP hosting/docker setup.