Skip to content

Commit

Permalink
OCDN_ADD_DOMAIN生成json文件
Browse files Browse the repository at this point in the history
  • Loading branch information
firefoxbug committed Jun 5, 2014
1 parent 015d28d commit 25149a0
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions test/producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ def purge_test():
producer = ProducerTest()
producer.produce_job_loop('OCDN_PURGE', job2do)


def add_domain_test():
TaskName = 'OCDN_PURGE'
TaskList = ['OCDN_RELOAD_NODE','OCDN_PROXY','OCDN_ADD_DNS']
Parameters = []
Parameters.append({'ip':'192.168.1.1','port':'80','domain':'www.firefoxbug.com','token':'821e57c57e8455e3e809e23df7bb6ce9'})
Parameters.append({'ip':'192.168.1.2','port':'80','domain':'www.firefoxbug.com','token':'821e57c57e8455e3e809e23df7bb6ce9'})

test = OcdnJSON()
job2do = test.create_job_json(TaskName, TaskList, Parameters)
pp.pprint(job2do)

producer = ProducerTest()
producer.produce_job_loop(TaskName, job2do)

if __name__ == '__main__':
purge_test()
add_domain_test()

0 comments on commit 25149a0

Please sign in to comment.