-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added requirements, readme and .gitignore
- Loading branch information
Showing
4 changed files
with
75 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.pyc | ||
darkside-mismatch.log |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
dark side | ||
============ | ||
a response-comparing proxy server made of pure evil | ||
|
||
you can use it to test out a new apprentice, to make sure it responds to all queries the same way master does. | ||
|
||
##setup | ||
|
||
`pip install -r requirements.txt` | ||
|
||
##usage | ||
|
||
suppose you have an existing api at api.legitimate-business.com, and you want to test the new api, at new-api.legitimate-business.com. run this: | ||
|
||
`python server.py api.legitimate-business.com --apprentice new-api.legitimate-business.com` | ||
|
||
darkside will listen on port 8987 (change that with --port) | ||
|
||
when you request /some/resource, darkside will get fetch both api.legitimate-business.com/some/resource and new-api.legitimate-business.com/some/resource, and compare the two. if they are different, darkside will make an entry in darkside-mismatch.log as well as print to the console. | ||
|
||
there's no limit to the number of apprentices you can take on - but don't go crazy, those guys get annoying when they're all "master master, please tell me more divine secrets" all the time. | ||
|
||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
argparse==1.2.1 | ||
colorama==0.2.4 | ||
gevent==0.13.8 | ||
greenlet==0.4.0 | ||
json-tools==0.1.30 | ||
requests==0.14.2 | ||
wsgiref==0.1.2 |
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