Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vplauzon committed Oct 17, 2023
1 parent ee8b130 commit f278ef5
Showing 1 changed file with 5 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,14 @@ public void ClusterComposedTableName()

private void TestAutoDeletePolicy(string tableName)
{
TestAutoDeletePolicy(tableName, false, false, true);
TestAutoDeletePolicy(tableName, true, false, true);
TestAutoDeletePolicy(tableName, true, true, true);

TestAutoDeletePolicy(tableName, false, false, false);
TestAutoDeletePolicy(tableName, true, false, false);
TestAutoDeletePolicy(tableName, true, true, false);
TestAutoDeletePolicy(tableName, true);
TestAutoDeletePolicy(tableName, false);
}

private void TestAutoDeletePolicy(
string tableName,
bool isJsonForm,
bool isMultiString,
bool isEnabled)
private void TestAutoDeletePolicy(string tableName, bool isEnabled)
{
var commandText = isJsonForm
? isMultiString
? @$"
.alter table {tableName} policy restricted_view_access
```
{{
""isEnabled"" : {isEnabled}
}}"
: $".alter table {tableName} policy restricted_view_access "
+ $@"'{{ ""isEnabled"" : {isEnabled.ToString().ToLower()} }}'"
: $".alter table {tableName} policy restricted_view_access"
+ $" {isEnabled.ToString().ToLower()}";
var commandText = @$"
.alter table {tableName} policy restricted_view_access {isEnabled.ToString().ToLower()}";
var command = ParseOneCommand(commandText);
var actualTableName = GetActualTableName(tableName);

Expand Down

0 comments on commit f278ef5

Please sign in to comment.