Skip to content

Commit 7278ded

Browse files
Allow tests to be run from anywhere
1 parent af2cddd commit 7278ded

17 files changed

+32
-18
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ env:
44
secure: h6qCuQnKi7fIzR53XqePRg2Hh0NrypqLyvYlJ+GEegEIP2PsPEwXMXZbswD7r+P4zsx7z2mBbR6VVYcjm1s0Zlf8RM2CNJ6IluAzDsg5Er7X7MAPaDEsfGJohZiTOPJvJNOV1BU7Qc4Y8Sqmd5ujVIJ4pL67oMegtmD36QBUAr7ERNrzbDXnPupIkcU/vf3z3vvCnH7/DIyP5hs1P+OAsgHY49bBMXxMEeMYQc0rtCN3F9yCmqh2f1mfEPouQnegKwcVFf3H08WQhYulAyNtrN0kcipMwF9+7cpLWtVyVMKepXvxXC0ltbaUTUqjvg5Op8WLOTG2xwXRdj6Fi985JPCvmsnX9teWT8WyxMex8ig7BVpontPajrhZJPfPWqj+oypqu8GMo/G0xD0uBGIVkadIQI4DQC1xFjKBBwntLdukeOApiAMhBEQtjQ5tO8vZw3kXifBdRHVuVHUjW6Lxd2R0xCKI0ZUmNggDaidsDRSU0C0HmHPHJELfGVm9Ohbsc01dYGiPczplV7Nxc4OKiPBZ5cvoKyNZFmM7ABtMKfGZR9PFv3A+6zzjnqIbHVdszzKN6ODKeotdVRt/VV7cMwZknwUqf7+fE/pjaHGpQ5ubX8wxhPzyxfcJHzKzYklFGCT8Rv/+VooYWJaKyjZ/e63fsjRTfTX84KRpSdWe4U8=
55
python:
66
- '2.7'
7-
before_script:
8-
- export PYTHONPATH=$PYTHONPATH:$(pwd)
97
script:
108
- echo "Testing source version"
119
- examples/create_alert.py XXX

examples/add_notification_email.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# Post a user event to Sysdig Cloud
44
#
55

6+
import os
67
import sys
7-
sys.path.insert(0, '../')
8+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
89
from sdcclient import SdcClient
910

1011
#

examples/create_alert.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
#
77
#
88

9+
import os
910
import sys
10-
sys.path.insert(0, '../')
11+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
1112
from sdcclient import SdcClient
1213

1314
#

examples/create_dashboard.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
# will monitor.
77
#
88

9+
import os
910
import sys
10-
sys.path.insert(0, '../')
11+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
1112
from sdcclient import SdcClient
1213

1314
#

examples/delete_alert.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# This example shows how to delete an alert
44
#
55

6+
import os
67
import sys
7-
sys.path.insert(0, '../')
8+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
89
from sdcclient import SdcClient
910

1011
#

examples/delete_dashboard.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# This example shows how to delete a dashboard
44
#
55

6+
import os
67
import sys
7-
sys.path.insert(0, '../')
8+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
89
from sdcclient import SdcClient
910

1011
#

examples/get_data_advanced.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
# containers inside the given host, with 1 minute data granularity
88
#
99

10+
import os
1011
import sys
11-
sys.path.insert(0, '../')
12+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
1213
from sdcclient import SdcClient
1314

1415
#

examples/get_data_datasource.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
# by providing a few clarifying examples
55
#
66

7+
import os
78
import sys
8-
sys.path.insert(0, '../')
9+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
910
from sdcclient import SdcClient
1011

1112
#

examples/get_data_simple.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
# the last 10 minutes, with 1 minute data granularity
88
#
99

10+
import os
1011
import sys
11-
sys.path.insert(0, '../')
12+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
1213
from sdcclient import SdcClient
1314

1415
#

examples/list_alerts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# Print 'enabled' flag and name for all of the alerts created by the user
44
#
55

6+
import os
67
import sys
7-
sys.path.insert(0, '../')
8+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
89
from sdcclient import SdcClient
910

1011
#

0 commit comments

Comments
 (0)