Permalink
Browse files

Fixed a bunch of things, tried to get other stuff working, just fustr…

…ated in general

* completed server_info.py files SHOULD NOT be in the repository, added it to gitignore
* sql should contain only sql files, and integration testing should have stuff like create_test_data.py
* changed create_test_data to use the server_info.py file from manager/
* mysql is case sensitive, so stuff like USER will give errors if there's only lowercase user table.
  • Loading branch information...
1 parent d215716 commit 387e88c93ec16e304a1add2ad7a8d9c7e6ceece7 @amstan amstan committed May 8, 2011
View
@@ -7,3 +7,5 @@
*.buildpath
submissions/*
maps/*
+server_info.py
+server_info.php
View
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import MySQLdb
import random
from server_info import server_info
@@ -1,8 +1,10 @@
-#!/usr/bin/python
+#!/usr/bin/env python
import os
import sys
import random
import MySQLdb
+
+sys.path.append("../manager")
from server_info import server_info
def create_test_data(user_count=10000, map_count=1000, game_count=30000, matchup_count=10):
@@ -27,8 +29,8 @@ def create_test_data(user_count=10000, map_count=1000, game_count=30000, matchup
while user_max > 1:
cursor.execute("""
insert into submission (user_id, version, status, timestamp, language_id, latest)
- select USER_ID, %s, 40, CURRENT_TIMESTAMP, 6, 0
- from USER
+ select user_id, %s, 40, CURRENT_TIMESTAMP, 6, 0
+ from user
order by user_id
limit %s;
""" % (version, user_max))
View
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
import MySQLdb
import os
import random
View
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
import sys
import MySQLdb
from server_info import server_info
View
@@ -1,12 +0,0 @@
-server_info = {
- "db_host": "localhost",
- "db_username": "aichallenge",
- "db_password": "alert_decay",
- "db_name": "aichallenge",
- "mail_name": "test",
- "mail_username": "",
- "mail_password": "",
- "maps_path": "C:/Users/Scott/git/aichallenge/maps/",
- "submissions_path": "C:/Users/Scott/git/aichallenge/submissions/",
- "root_path": "C:/Users/Scott/git/aichallenge/"
-}

0 comments on commit 387e88c

Please sign in to comment.