Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider testing other auth modes beyond connection string for tests in Data.Table (both unit test and live mode) #6204

Open
ahsonkhan opened this issue Nov 9, 2024 · 0 comments

Comments

@ahsonkhan
Copy link
Member

Some of the existing tables tests are configured to only run with connection string auth mode.
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4308778&view=logs&j=4dce5c19-e405-5fa0-33da-8863256ab80c&t=50966b7b-fb3e-5a8b-af38-b375d01c5327

It'd be a good idea to test other auth modes, OR if they are not necessary to improve test coverage, re-write the parameterized tests to only use the auth mechanism we need to test, and no longer be paremeterized. Otherwise, the following tests always get generated and skipped (regardless in CI or nightly/live mode).

The following tests did not run:
	 78 - azure-data-tables.Tables/TablesClientTest.GetAccessPolicy/key (Skipped)
	 80 - azure-data-tables.Tables/TablesClientTest.GetAccessPolicy/sas_LIVEONLY_ (Skipped)
	 81 - azure-data-tables.Tables/TablesClientTest.SetAccessPolicy/key (Skipped)
	 83 - azure-data-tables.Tables/TablesClientTest.SetAccessPolicy/sas_LIVEONLY_ (Skipped)
	138 - azure-data-tables.Tables/TablesClientTest.TransactionCreateFail/key (Skipped)
	140 - azure-data-tables.Tables/TablesClientTest.TransactionCreateFail/sas_LIVEONLY_ (Skipped)
	141 - azure-data-tables.Tables/TablesClientTest.TransactionCreateOK/key (Skipped)
	143 - azure-data-tables.Tables/TablesClientTest.TransactionCreateOK/sas_LIVEONLY_ (Skipped)
	144 - azure-data-tables.Tables/TablesClientTest.TransactionDelete/key (Skipped)
	146 - azure-data-tables.Tables/TablesClientTest.TransactionDelete/sas_LIVEONLY_ (Skipped)
	147 - azure-data-tables.Tables/TablesClientTest.TransactionMerge/key (Skipped)
	149 - azure-data-tables.Tables/TablesClientTest.TransactionMerge/sas_LIVEONLY_ (Skipped)
	150 - azure-data-tables.Tables/TablesClientTest.TransactionUpdate/key (Skipped)
	152 - azure-data-tables.Tables/TablesClientTest.TransactionUpdate/sas_LIVEONLY_ (Skipped)
	153 - azure-data-tables.Tables/TablesClientTest.TransactionInsertReplace/key (Skipped)
	155 - azure-data-tables.Tables/TablesClientTest.TransactionInsertReplace/sas_LIVEONLY_ (Skipped)

For example:

TEST_P(TablesClientTest, TransactionDelete)
{
if (GetParam() != AuthType::ConnectionString)
{
SkipTest();
return;
}

Also, it is strange to see tests named _LIVEONLY_ run in PR/CI runs that are not liveonly.
Consider fixing that, so the name is applied only when the tests are actually run in live mode.

For example:
https://dev.azure.com/azure-sdk/public/_build/results?buildId=4303796&view=logs&j=97d63481-2a2c-56b1-7542-28ff4f6c300c&t=77db9423-c813-5d44-8de0-ef1651559362

The name is being set here:

static std::string GetSuffix(const testing::TestParamInfo<AuthType>& info)
{
std::string stringValue = "";
switch (info.param)
{
case AuthType::ConnectionString:
stringValue = "connectionstring_LIVEONLY_";
break;
case AuthType::Key:
stringValue = "key";
break;
case AuthType::SAS:
stringValue = "sas_LIVEONLY_";
break;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants