Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation not up to date? #365

Open
AronBuzogany opened this issue Apr 25, 2023 · 5 comments
Open

Documentation not up to date? #365

AronBuzogany opened this issue Apr 25, 2023 · 5 comments

Comments

@AronBuzogany
Copy link

I am trying to create a custom docker image to test my services. For this I follow an example presented in the documentation.

As you can see from this screenshot:

image

The docker container looks for the given files in /app/data not in /data as claimed in the documentation.

When changing it to /app/data in the run script however it does find the script.

However now I get the following error:

image
When I run the following script:

image

I get the following error:

image

I have the following setup:

harness
|──data
|  |     [specifications-test repo](https://github.com/solid-contrib/specification-tests) (cloned)
| [CHT](https://github.com/solid-contrib/conformance-test-harness) (cloned)
|
|  run.sh (script in screenshot above)

And that's it. Is it me doing something wrong here?

@edwardsph
Copy link
Collaborator

Sorry you are having issues with this. I'm away at present so can't look very deeply at the issue. It might be worth looking at https://github.com/solid-contrib/specification-tests/blob/main/run.sh to see how the image is used there. I haven't understood why you are building a custom image - can you just use the default one, and if you are trying to run your own specification-tests, then use the -d option in the run script to point to a local directory of tests?

@AronBuzogany
Copy link
Author

Thanks for your response @edwardsph . Currently I have indeed used this as you proposed. I am trying to put the CTH in a Docker Composable for comfort and ease. At this moment there isn't any configuration with the run.sh script to place the image in an existing network, instead of creating and removing one.

But you are correct. It works the same with the run.sh script.

@edwardsph
Copy link
Collaborator

Just in case I misunderstood, does this mean your problem is resolved for now? Is the documentation correct?

@AronBuzogany
Copy link
Author

I don't think so, the documentation provides this structure:

image

While as per my screenshot above it seems that it looks for data/ in app/data/.

@edwardsph
Copy link
Collaborator

Thanks for your patience. I finally had time to take a deeper look. It's a while since I set this up but the docker container does load the default tests into /data as per https://github.com/solid-contrib/conformance-test-harness/blob/main/src/main/docker/Dockerfile. You only need to map the tests & config if you are running local ones. I can run tests with a simpler command:

docker run -i --rm \
  -v /c/dev/solid/specification-tests/reports/ess:/reports \
  --env-file=ess.env solidproject/conformance-test-harness \
  --output=/reports \
  --target=https://github.com/solid/conformance-test-harness/ess

The output for this command shows:

2023-05-03 07:32:16,415 INFO  [org.sol.tes.con.Config] (main) Path mappings:   [https://github.com/solid-contrib/specification-tests/blob/main => file:///data]
2023-05-03 07:32:16,416 INFO  [org.sol.tes.con.Config] (main) Output directory:   /reports
2023-05-03 07:32:16,416 INFO  [org.sol.tes.con.Config] (main) Subjects URL:    file:/data/test-subjects.ttl
...
2023-05-03 07:32:17,037 INFO  [org.sol.tes.uti.DataRepository] (main) Loading file:/data/protocol/solid-protocol-test-manifest.ttl with base https://github.com/solid-contrib/specification-tests/blob/main/protocol/solid-protocol-test-manifest.ttl

You can see the test files are loaded from /data/.

The docs you referred to give a more detailed command in the context of:

If you want to run different tests or supply a different config file, you can mount local directories in place of other internal ones.

In that case, I ran:

docker run -i --rm \
  -v /c/dev/solid/specification-tests/:/data \
  -v /c/dev/solid/specification-tests/config:/app/config \
  -v /c/dev/solid/specification-tests/target:/app/target \
  -v /c/dev/solid/specification-tests/reports/ess:/reports \
  --env-file=ess.env solidproject/conformance-test-harness \
  --output=/reports \
  --target=https://github.com/solid/conformance-test-harness/ess

and the output was

2023-05-03 07:37:34,009 INFO  [org.sol.tes.con.Config] (main) Path mappings:      [https://github.com/solid-contrib/specification-tests/blob/main => file:///data]
2023-05-03 07:37:34,010 INFO  [org.sol.tes.con.Config] (main) Output directory:   /reports
2023-05-03 07:37:34,010 INFO  [org.sol.tes.con.Config] (main) Subjects URL:       file:/data/test-subjects.ttl
...
2023-05-03 07:37:34,579 INFO  [org.sol.tes.uti.DataRepository] (main) Loading file:/data/protocol/solid-protocol-test-manifest.ttl with base https://github.com/solid-contrib/specification-tests/blob/main/protocol/solid-protocol-test-manifest.ttl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants