tests: Get username from environment
FossilOrigin-Name: 4c1432632b30cbe6e876af1b803dfbe826166cd9d5bfd4d15043c67bcd9a59de
This commit is contained in:
parent
35212e3305
commit
2600168d95
1 changed files with 5 additions and 2 deletions
|
@ -14,12 +14,15 @@ OF_APPLICATION_DELEGATE(Test)
|
|||
@implementation Test
|
||||
- (void)applicationDidFinishLaunching
|
||||
{
|
||||
OFString *username =
|
||||
[[OFApplication environment] objectForKey: @"USER"];
|
||||
PGResult *result;
|
||||
|
||||
connection = [[PGConnection alloc] init];
|
||||
[connection setParameters:
|
||||
[OFDictionary dictionaryWithKeysAndObjects: @"user", @"js",
|
||||
@"dbname", @"js", nil]];
|
||||
[OFDictionary dictionaryWithKeysAndObjects: @"user", username,
|
||||
@"dbname", username,
|
||||
nil]];
|
||||
[connection connect];
|
||||
|
||||
[connection executeCommand: @"DROP TABLE IF EXISTS test"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue