Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rene-ye committed Feb 12, 2020
1 parent 7c67ebd commit 62d2e64
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 728 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,34 +183,14 @@ static void setAEConnectionString(String serverName, String url, String protocol

// show progress if testing multiple servers
if (enclaveServer.length > 1) {
System.out.println("Adding enclave configuration: " + enclaveProperties);
System.out.println("Running against: " + enclaveProperties);
}
} else {
AETestConnectionString = connectionString + ";sendTimeAsDateTime=false"
+ ";columnEncryptionSetting=enabled";
}
}

/**
* Setup AE connection string and check setup
*
* @param serverName
* @param url
* @param protocol
* @throws SQLException
*/
void checkAESetup(String serverName, String url, String protocol) throws Exception {
setAEConnectionString(serverName, url, protocol);

try (SQLServerConnection con = PrepUtil.getConnection(AETestConnectionString, AEInfo)) {
isAEv2 = TestUtils.isAEv2(con);
} catch (SQLException e) {
isAEv2 = false;
} catch (Exception e) {
fail(TestResource.getResource("R_unexpectedErrorMessage") + e.getMessage());
}
}

@BeforeAll
public static void setupAETest() throws Exception {
readFromFile(Constants.JAVA_KEY_STORE_FILENAME, "Alias name");
Expand Down Expand Up @@ -251,6 +231,8 @@ public static void setupAETest() throws Exception {
createCEK(cmkWin, cekWin, null);
}
}

isAEv2 = enclaveServer.length > 0;
}

/**
Expand Down
Loading

0 comments on commit 62d2e64

Please sign in to comment.