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

CI: htmltest with 404 status does not treated as a failure on make hugo-test step #1712

Closed
aLekSer opened this issue Jul 23, 2020 · 1 comment · Fixed by #1715
Closed

CI: htmltest with 404 status does not treated as a failure on make hugo-test step #1712

aLekSer opened this issue Jul 23, 2020 · 1 comment · Fixed by #1715
Labels
area/tests Unit tests, e2e tests, anything to make sure things don't break kind/bug These are bugs.
Milestone

Comments

@aLekSer
Copy link
Collaborator

aLekSer commented Jul 23, 2020

htmltest behaves strange, it show lots of hash does not exist errors and some 404 errors but the result is successful.

What happened:

  hash does not exist --- site/docs/guides/client-sdks/cpp/index.html --> /site/docs/guides/client-sdks/#watchgameserver-function-gameserver
  Non-OK status: 404 --- site/docs/guides/client-sdks/cpp/index.html --> https://github.com/openssl/openssl/blob/master/NOTES.WIN
site/docs/guides/client-sdks/rust/index.html
...
========================================================================
✘✘✘ failed in 509.190088ms
28 errors in 111 documents
make[1]: Leaving directory '/workspace/build'

https://console.cloud.google.com/cloud-build/builds/d87378b2-7dc8-4ee7-a127-8db3c1cc684d;step=17?project=agones-images
What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

make hugo-test

Anything else we need to know?:

Environment:

  • Agones version:
  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • Install method (yaml/helm):
  • Troubleshooting guide log(s):
  • Others:
@aLekSer aLekSer added the kind/bug These are bugs. label Jul 23, 2020
@aLekSer
Copy link
Collaborator Author

aLekSer commented Jul 23, 2020

I assume that this website.mk target should return latest error out of the loop:

"mkdir -p /tmp/website && cp -r $(mount_path)/site/public /tmp/website/site && htmltest -c $(mount_path)/site/htmltest.yaml /tmp/website" && \
	break || sleep 60;

I have created examples to see the error output:

Big makefile example
hugo-test: site-static-preview
	for i in 1 2 3 4 5; \
		do echo "Html Test: Attempt $$i" && \
		  docker run --rm -t -e "TERM=xterm-256color" $(common_mounts) $(DOCKER_RUN_ARGS) $(build_tag) bash -c \
			"mkdir -p /tmp/website && cp -r $(mount_path)/site/public /tmp/website/site && htmltest  -c $(mount_path)/site/htmltest.yaml /tmp/website" && \
	break || sleep 60; done

hugo-test2:
	for i in 1 2 3 4 5; \
		do echo "Html Test: Attempt $$i" && \
		  docker run --rm -t -e "TERM=xterm-256color" $(common_mounts) $(DOCKER_RUN_ARGS) $(build_tag) bash -c \
			"ssl" && \
	break || sleep 1; done


hugo-test3:
	for i in 1 2 3 4 5; \
		do echo "Html Test: Attempt $$i" && \
		  docker run --rm -t -e "TERM=xterm-256color" $(common_mounts) $(DOCKER_RUN_ARGS) $(build_tag) bash -c \
			"ssl" ; done

Output :

>make hugo-test3
for i in 1 2 3 4 5; \
        do echo "Html Test: Attempt $i" && \
          docker run --rm -t -e "TERM=xterm-256color" <mounts>  agones-build:8f335b4456 bash -c \
                "ssl" ; done
Html Test: Attempt 1
bash: ssl: command not found
...
Html Test: Attempt 5
bash: ssl: command not found
includes/website.mk:78: recipe for target 'hugo-test3' failed
make: *** [hugo-test3] Error 127

>make hugo-test2
...
Html Test: Attempt 5
bash: ssl: command not found
>echo $? 
0

@markmandel markmandel added this to the 1.8.0 milestone Aug 11, 2020
@markmandel markmandel added the area/tests Unit tests, e2e tests, anything to make sure things don't break label Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests Unit tests, e2e tests, anything to make sure things don't break kind/bug These are bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants