Enable the configuration of storage account and key in unit test #35

gcheng opened this Issue Apr 4, 2012 · 3 comments


None yet

4 participants

gcheng commented Apr 4, 2012

Currently no, to run the tests for table you need to change the account string in TableTestBase.java. If you guys would like to provide more information on how ongoing testing is going to be accomplished ( i.e. config, reporting etc) then we can modify our tests to fit that. For this release however we will continue to test as is so please let us know when a build is available,



From: Jason Cooke
Sent: Wednesday, February 22, 2012 10:12 PM
To: Joe Giardino; Jeff Irwin; Deepak Verma; Joost de Nijs; Jai Haridas; Metodi Mladenov; Jeff Wilcox
Cc: Mohit Srivastava; Louis DeJardin
Subject: RE: Shipping Java Tables

Can the unit tests be run without changing the test strings in the unit tests?

For our unit tests, they look at the env variables to modify the default strings. That makes it easy to run the unit tests on our CI server (an on testers’ machines).



Jason - can you look into this an propose a solution (like our environment variables) that the storage team could then use to fix this issue.


One approach would be to alter the setup method in microsoft-azure-api/src/test/java/com/microsoft/windowsazure/services/table/client/TableTestBase.java to replace

        httpAcc = CloudStorageAccount.parse(CLOUD_ACCOUNT_HTTP);


        String tmp = CLOUD_ACCOUNT_HTTP;
        String accountName = System.getenv("table.accountName");
        if (accountName != null) {
            tmp = tmp.replace("[ACCOUNT NAME]", accountName);
        String accountKey = System.getenv("table.accountKey");
        if (accountKey != null) {
            tmp = tmp.replace("[ACCOUNT KEY]", accountKey);

        httpAcc = CloudStorageAccount.parse(tmp);

Then, if the environment variables are not set, it is a no-op.Those environment variables would make it consistant with what the Table service layer uses.


This is fixed.

@jcookems jcookems closed this Jan 29, 2013
@jeffreyjirwin jeffreyjirwin was unassigned by gcheng Apr 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment