Skip to content

Commit e89ff25

Browse files
committed
Merge pull request #8 from marpaia/travis
travis ci
2 parents 138a785 + 9e08168 commit e89ff25

9 files changed

Lines changed: 36 additions & 17 deletions

File tree

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: python
2+
python:
3+
- "2.6"
4+
- "2.7"
5+
- "3.2"
6+
- "3.3"
7+
- "3.4"
8+
install:
9+
- pip install -r requirements.txt
10+
script:
11+
- python setup.py build
12+
- python setup.py test

osquery/extensions/Extension.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

osquery/extensions/ExtensionManager.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ def run(self):
8282
author_email="osquery@fb.com",
8383
url="https://osquery.io",
8484
license=LICENSE,
85-
packages=["osquery",],
85+
packages=[
86+
"osquery",
87+
"osquery.extensions",
88+
],
8689
install_requires=[
8790
"thrift>=0.9",
8891
"argparse>=1.1",
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
from __future__ import print_function
99
from __future__ import unicode_literals
1010

11-
from os.path import dirname, abspath
1211
import json
12+
import os
1313
import sys
1414
import unittest
1515

16-
sys.path.insert(0, abspath("%s/../build/lib" % dirname(abspath(__file__))))
17-
16+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
17+
"../build/lib/")))
1818
import osquery
1919

2020
class MockConfigPlugin(osquery.ConfigPlugin):
@@ -49,7 +49,7 @@ def test_simple_call(self):
4949
{"action":"genConfig"})
5050
self.assertEqual(0, response.status.code)
5151
self.assertTrue(len(response.response) > 0)
52-
self.assertIn("source_1", response.response[0])
52+
self.assertTrue("source_1" in response.response[0])
5353

5454
if __name__ == '__main__':
5555
unittest.main()
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
from __future__ import print_function
99
from __future__ import unicode_literals
1010

11-
from os.path import dirname, abspath
11+
import os
1212
import sys
1313
import unittest
1414

15-
sys.path.insert(0, abspath("%s/../build/lib" % dirname(abspath(__file__))))
15+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
16+
"../build/lib/")))
1617

1718
import osquery
1819

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
from __future__ import print_function
99
from __future__ import unicode_literals
1010

11-
from os.path import dirname, abspath
11+
import os
1212
import sys
1313
import unittest
1414

15-
sys.path.insert(0, abspath("%s/../build/lib" % dirname(abspath(__file__))))
15+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
16+
"../build/lib/")))
1617

1718
import osquery
1819

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
from __future__ import print_function
1111
from __future__ import unicode_literals
1212

13-
from os.path import dirname, abspath
13+
import os
1414
import sys
1515
import unittest
1616

17-
sys.path.insert(0, abspath("%s/../build/lib" % dirname(abspath(__file__))))
17+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
18+
"../build/lib/")))
1819

1920
import osquery
2021

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
from __future__ import print_function
99
from __future__ import unicode_literals
1010

11-
from os.path import dirname, abspath
11+
import os
1212
import sys
1313
import unittest
1414

15-
sys.path.insert(0, abspath("%s/../build/lib" % dirname(abspath(__file__))))
15+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
16+
"../build/lib/")))
1617

1718
import osquery
1819

@@ -45,8 +46,8 @@ def test_plugin_was_registered(self):
4546
"""Tests to ensure that a plugin was registered"""
4647
osquery.ExtensionManager().add_plugin(MockTablePlugin)
4748
registry = osquery.ExtensionManager().registry()
48-
self.assertIn("table", registry)
49-
self.assertIn("foobar", registry["table"])
49+
self.assertTrue("table" in registry)
50+
self.assertTrue("foobar" in registry["table"])
5051

5152
def test_routes_are_correct(self):
5253
"""Tests to ensure that a plugins routes are correct"""

0 commit comments

Comments
 (0)