Comparing version 2.7.0 to 2.8.0
@@ -50,3 +50,4 @@ { | ||
"/etc/yellowdog-release" : ["Yellow Dog"], | ||
"/etc/alpine-release": ["Alpine Linux"] | ||
"/etc/alpine-release": ["Alpine Linux"], | ||
"/etc/system-release": ["Amazon Linux"] | ||
} |
{ | ||
"name": "getos", | ||
"version": "2.7.0", | ||
"version": "2.8.0", | ||
"description": "Get the OS/Distribution name of the environment you are working on", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -44,31 +44,19 @@ # getos | ||
## Tests | ||
## Unit Tests | ||
We have two forms of tests, unit tests and integration tests. | ||
### Unit Tests | ||
Unit tests stub out the behaviour of the OS files and libraries we depend on to ensure the behaviour of the application is sound. You can run these simply by running `npm test` | ||
### Integration tests | ||
## Authors and Contributors | ||
> NOTE: Currently the integration tests only run on Node 0.10 due to native modules for execSync. | ||
> Also, the integration tests depend on the Linux utility `sleep`. | ||
getos has been made possible by these fantastic contributors: | ||
The integration tests sanity checks the assumptions we make about the format of the OS files and libraries we depend on against real world OS configurations. These tests currently offer only visual confirmation of the output. | ||
The tests are powered by docker, and must be run from the top level directory of the project. You can run them via | ||
```sh | ||
node tests/runTest.js | ||
``` | ||
Since these are powered by docker, you must have docker installed to run the tests. You will notice that the first time the tests run, they will probably take somewhere between 30 minutes and 4 hours to complete. They download a bakers dozen of gigs to build the docker images. Pretty network intensive stuff. Also, if you are a neckbeard and have your HDD partitioned to isolate _/var_ and _/tmp_ on small partitions, the tests will probably crash. _/tmp_ will need ~4GB of free space for the tests to run. _/var_ will need ~20GB to store all the images. | ||
You can also run the tests via | ||
```sh | ||
npm run integration | ||
``` | ||
But the fantastic spinner packaged with npm mucks up stdout, so output will be garbled. | ||
<table><tbody> | ||
<tr><th align="left">Benjamin E. Coe</th><td><a href="https://github.com/bcoe">GitHub/bcoe</a></td><td><a href="http://twitter.com/benjamincoe">Twitter/@benjamincoe</a></td></tr> | ||
<tr><th align="left">Eugene Sharygin</th><td><a href="https://github.com/eush77">GitHub/eush77</a></td><td><a href="http://twitter.com/eush77">Twitter/@eush77</a></td></tr> | ||
<tr><th align="left">David Routhieau</th><td><a href="https://github.com/root-io">GitHub/root-io</a></td><td>unknown</td></tr> | ||
<tr><th align="left">Lawrence</th><td><a href="https://github.com/mindmelting">GitHub/mindmelting</a></td><td><a href="http://twitter.com/mindmelting">Twitter/@mindmelting</a></td></tr> | ||
<tr><th align="left">Roman Jurkov</th><td><a href="https://github.com/winfinit">GitHub/winfinit</a></td><td><a href="http://twitter.com/winfinit">Twitter/@winfinit</a></td></tr> | ||
<tr><th align="left">Rod Vagg</th><td><a href="https://github.com/rvagg">GitHub/rvagg</a></td><td><a href="http://twitter.com/rvagg">Twitter/@rvagg</a></td></tr> | ||
<tr><th align="left">Zeke Sikelianos</th><td><a href="https://github.com/zeke">GitHub/zeke</a></td><td><a href="http://twitter.com/zeke">Twitter/@zeke</a></td></tr> | ||
<tr><th align="left">Alexander</th><td><a href="https://github.com/alex4Zero">GitHub/alex4Zero</a></td><td><a href="http://twitter.com/alex4Zero">Twitter/@alex4Zero</a></td></tr> | ||
</tbody></table> |
@@ -24,3 +24,4 @@ [ | ||
, { "desc": "Alpine Linux", "platform": "linux", "file": { "/etc/alpine-release": "3.3\n" }, "expected": { "dist": "Alpine Linux", "os": "linux", "release": "3.3" } } | ||
, { "desc": "Amazon Linux", "platform": "linux", "file": { "/etc/system-release": "Amazon Linux AMI release 2016.03"}, "expected": {"dist": "Amazon Linux", "os": "linux", "release": "2016.03"}} | ||
] |
25700
28
394
62