asciidoctor / docker-asciidoctor

:ship: A Docker image for using the Asciidoctor toolchain to process AsciiDoc content
https://hub.docker.com/r/asciidoctor/docker-asciidoctor/
Other
322 stars 150 forks source link

Failing tests for 1.31 release #298

Closed mielmat closed 1 year ago

mielmat commented 1 year ago

Hello all, I wanted to use this image to generate slides using reveal.js. I had some initial slides definition, and for basic case it works. Problem is, when I want to add some diagram, like plantuml or graphviz, asciidoctor started to complain (example below is for plantuml, in case of trying generate graphviz diagram it complains about dot:

bash-5.1# asciidoctor-revealjs --verbose --trace -a revealjsdir=https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.9.2 -r asciidoctor-diagram presentation.adoc
asciidoctor: ERROR: presentation.adoc: line 79: Failed to generate image: Could not find Java executable

I'm able to run java -version in the image, and result is expected:

bash-5.1# java -version
openjdk version "17.0.4.1" 2022-08-12
OpenJDK Runtime Environment (build 17.0.4.1+1-alpine-r0)
OpenJDK 64-Bit Server VM (build 17.0.4.1+1-alpine-r0, mixed mode, sharing)

So, I decided to clone the repo and run bats test on my local machine. Result is similar to what I can achieve during my presentation generation, so tests are complaining about missing Java executable and etc. Steps done:

export IMAGE_NAME=asciidoctor/docker-asciidoctor:1.31
make test

and this is the result:

bats <redacted>/docker-asciidoctor/tests/asciidoctor.bats
1..34
ok 1 The Docker image to test is available
ok 2 asciidoctor is installed and in version 2.0.17
ok 3 Timezone data is present in the image
ok 4 asciidoctor-pdf is installed and in version 2.3.2
ok 5 asciidoctor-revealjs is callable without error
not ok 6 make is installed and in the path
# (in test file tests/asciidoctor.bats, line 57)
#   `docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" which make' failed
# which: no make in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
not ok 7 asciidoctor-epub3 is installed and in the path
# (in test file tests/asciidoctor.bats, line 61)
#   `docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" which asciidoctor-epub3' failed
# which: no asciidoctor-epub3 in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
ok 8 asciidoctor-fb2 is installed and in version 0.5.1
not ok 9 curl is installed and in the path
# (in test file tests/asciidoctor.bats, line 71)
#   `docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" which curl' failed
# which: no curl in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
not ok 10 bash is installed and in the path
# (in test file tests/asciidoctor.bats, line 75)
#   `docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" which bash' failed
# which: no bash in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
not ok 11 java is installed, in the path, and executable
# (in test file tests/asciidoctor.bats, line 79)
#   `docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" which java' failed
# which: no java in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
not ok 12 python3 is installed, in the path, and executable
# (in test file tests/asciidoctor.bats, line 84)
#   `docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" which python3' failed
# which: no python3 in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
not ok 13 dot (from Graphviz) is installed and in the path
# (in test file tests/asciidoctor.bats, line 89)
#   `docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" which dot' failed
# which: no dot in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
not ok 14 asciidoctor-confluence is installed and in the path
# (in test file tests/asciidoctor.bats, line 93)
#   `docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" which asciidoctor-confluence' failed
# which: no asciidoctor-confluence in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
not ok 15 kramdoc is installed and in the path
# (in test file tests/asciidoctor.bats, line 97)
#   `docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" which kramdoc' failed
# which: no kramdoc in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
not ok 16 git command line tool is installed and in the path
# (in test file tests/asciidoctor.bats, line 102)
#   `docker run -t --rm "${DOCKER_IMAGE_NAME_TO_TEST}" which git' failed
# which: no git in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
ok 17 We can generate an HTML document from basic example
not ok 18 We can generate a PDF document from basic example
# (in test file tests/asciidoctor.bats, line 116)
#   `docker run -t --rm \' failed
# No such file or directory - /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-pdf-2.3.2/data/fonts/notoserif-regular-subset.ttf not found
#   Use --trace to show backtrace
ok 19 We can generate an FB2 document from basic example without errors/warnings
not ok 20 We can generate an HTML document with a diagram with asciidoctor-diagram as backend
# (in test file tests/asciidoctor.bats, line 149)
#   `[ "$(echo ${output} | grep -c -i error)" -eq 0 ]' failed
# -- Output of command:
# asciidoctor: ERROR: sample-with-diagram.adoc: line 13: Failed to generate image: Could not find Java executable
# asciidoctor: ERROR: sample-with-diagram.adoc: line 24: Failed to generate image: Could not find Java executable
# asciidoctor: ERROR: sample-with-diagram.adoc: line 46: Failed to generate image: Could not find the 'dot' executable in PATH; add it to the PATH or specify its location using the 'graphvizdot' document attribute
# asciidoctor: ERROR: activity_diagram.txt: line 0: Failed to generate image: Could not find Java executable
# asciidoctor: ERROR: sample-with-diagram.adoc: line 70: Failed to generate image: Could not find the 'nwdiag', 'nwdiag3' executable in PATH; add it to the PATH or specify its location using the 'nwdiag' document attribute
# asciidoctor: ERROR: sample-with-diagram.adoc: line 93: Failed to generate image: Could not find the 'blockdiag', 'blockdiag3' executable in PATH; add it to the PATH or specify its location using the 'blockdiag' document attribute
# asciidoctor: ERROR: sample-with-diagram.adoc: line 105: Failed to generate image: Could not find the 'rackdiag', 'rackdiag3' executable in PATH; add it to the PATH or specify its location using the 'rackdiag' document attribute
# asciidoctor: ERROR: sample-with-diagram.adoc: line 141: Failed to generate image: Could not find the 'erd' executable in PATH; add it to the PATH or specify its location using the 'erd' document attribute
# --
ok 21 asciidoctor-kroki is installed as a gem with the version 0.7.0
ok 22 We can generate an HTML document with a diagram with asciidoctor-kroki as backend
ok 23 Bakoma Fonts are installed to render correctly the square root from asciidoctor-mathematical
ok 24 Noto CJK Fonts are installed to render correctly the PlantUML diagram from asciidoctor-diagram
ok 25 DejaVu Fonts are installed to get corretly rendered PlantUML-Graphs
ok 26 We can generate an HTML document with asciidoctor-mathematical as backend
ok 27 We can generate an EPub document with asciidoctor-epub3
ok 28 We can generate an HTML document with asciimath as backend
not ok 29 We can generate a PDF document with asciidoctor-mathematical as backend
# (in test file tests/asciidoctor.bats, line 243)
#   `[ "${status}" -eq 0 ]' failed
ok 30 We can generate a Reveal.js Slide deck
ok 31 We can generate HTML documents with different syntax-colored codes
not ok 32 We can generate PDF documents with different syntax-colored codes
# (in test file tests/asciidoctor.bats, line 281)
#   `docker run -t --rm \' failed
# No such file or directory - /usr/lib/ruby/gems/3.1.0/gems/asciidoctor-pdf-2.3.2/data/fonts/notoserif-regular-subset.ttf not found
#   Use --trace to show backtrace
ok 33 We can convert a Markdown file to an AsciiDoc file
ok 34 We can produce a website with citations from bibtex

34 tests, 14 failures

Do you know what is going on?

Thanks for help in advance.

dduportal commented 1 year ago

Hi @mielmat , did you still have the issue with latest versions?

mielmat commented 1 year ago

hello @dduportal, sorry for late answer. I didn't had chance to check that. I generated my presentation without using docker, and it was one-time activity. Now I don't need it - I even changed my computer, so I can't check newer version of image. Sorry for that.