PyconUK / pyconuk.github.io

OLD REPOS - DO NOT USE. PyCon UK website
http://www.pyconuk.org/
3 stars 9 forks source link

Run tests locally #50

Closed ghickman closed 9 years ago

ghickman commented 9 years ago

What's this PR do?

Introduce the make tests command for running the tests locally. Both tests (name linting and html proofing) now live in the tests directory.

I've also fixed a bug in the name linting test to do with single brackets conditional and added the phony stuff to the makefile to avoid issues with the tests directory and tests target.

How should this be manually tested?

Checkout this branch and run make tests.

What are the relevant tickets?

Fixes #34

Screenshots

ghickman commented 9 years ago

Could someone check this locally please? I'm not sure if the name, evil_hoover, is a locally generated name for my docker container or not.

d0ugal commented 9 years ago
/tmp/pyconuk.github.io run-tests-locally  
❯ make tests
Checking the conference name
Proofing the HTML
Post http:///var/run/docker.sock/v1.17/containers/evil_hoover/start: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
FATA[0000] Error: failed to start one or more containers 
make: *** [tests] Error 1
d0ugal commented 9 years ago

... That error may be related to my setup actually, I can't run the website at all. I've not used docker for a while on this machine.

inglesp commented 9 years ago

Thanks for working on this @ghickman.

This doesn't actually work for me either:

$ make tests
Checking the conference name
Proofing the HTML
Error response from daemon: No such container: evil_hoover
FATA[0000] Error: failed to start one or more containers 
make: *** [tests] Error 1

I think that the problem is that you're trying to start a container based on a randomly-assigned name, "evil_hoover". I don't know enough about docker to know what the right thing to do here is.

Also, name-lint.sh isn't executable at the moment, which means that you can't run it from the command line without chmodding it.

inglesp commented 9 years ago

Closing, since this is now working at https://github.com/PyconUK/pyconuk.org.