From 2600168d954a8c57fbf2eba64e5314623d7b0646 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Fri, 18 Jul 2014 23:35:22 +0000 Subject: [PATCH] tests: Get username from environment FossilOrigin-Name: 4c1432632b30cbe6e876af1b803dfbe826166cd9d5bfd4d15043c67bcd9a59de --- tests/tests.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/tests.m b/tests/tests.m index d3bbe89..d047c38 100644 --- a/tests/tests.m +++ b/tests/tests.m @@ -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"];