-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Python tests to JavaScript (#160)
- Loading branch information
Showing
17 changed files
with
128 additions
and
491 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,19 @@ | ||
# Developing tests | ||
|
||
Tests are being implemented in javascript (and soon to be Typescript). | ||
Some tests require a docker registry running locally on port 5000. This is handled | ||
automatically in the Github action tests, | ||
but if you want to run the tests yourself you will need to have docker installed | ||
and run something like: | ||
Some tests require a docker registry running locally on port 5000 as well as | ||
some images built. | ||
|
||
``` | ||
docker run -d -p 5000:5000 --name registry registry:2 | ||
``` | ||
|
||
... or if you run `make test`, this is automatically handled for you. After | ||
which time, you can just run `npm` directly: | ||
``` | ||
npm test | ||
for distro in alpine centos debian; do | ||
docker build -t localhost:5000/match-coverage/$distro ./tests/fixtures/image-$distro-match-coverage | ||
docker push localhost:5000/match-coverage/$distro:latest | ||
done | ||
``` | ||
|
||
Some of the existing tests are written in Python 3 and will | ||
download [act](https://github.com/nektos/act) and create a Python virtual | ||
environment to run them in. To run these locally, from the root directory execute: | ||
Then, just run: | ||
|
||
``` | ||
npm run build | ||
make check | ||
npm test | ||
``` |
Oops, something went wrong.