Skip to content

Commit

Permalink
DMD-33 - update testRefreshTablesInformation
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtabiberle committed Jan 24, 2025
1 parent 02605f6 commit fe57b22
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,18 @@ public function testRefreshTablesInformation(): void

$db = $this->ensureSnowflakeConnection();

$db->executeQuery(
sprintf(
'USE ROLE %s;',
SnowflakeQuote::quoteSingleIdentifier($this->getSnowflakeUser()),
),
);

$db->executeQuery(
sprintf(
'GRANT ROLE %s TO USER %s;',
SnowflakeQuote::quoteSingleIdentifier($workspace['connection']['database']),
SnowflakeQuote::quoteSingleIdentifier((string) getenv('SNOWFLAKE_USER')),
SnowflakeQuote::quoteSingleIdentifier($this->getSnowflakeUser()),
),
);

Expand Down Expand Up @@ -116,15 +123,15 @@ public function testRefreshTablesInformation(): void
$db->executeQuery(
sprintf(
'USE ROLE %s;',
SnowflakeQuote::quoteSingleIdentifier((string) getenv('SNOWFLAKE_USER')),
SnowflakeQuote::quoteSingleIdentifier($this->getSnowflakeUser()),
),
);

$db->executeQuery(
sprintf(
'REVOKE ROLE %s FROM USER %s;',
SnowflakeQuote::quoteSingleIdentifier($workspace['connection']['database']),
SnowflakeQuote::quoteSingleIdentifier((string) getenv('SNOWFLAKE_USER')),
SnowflakeQuote::quoteSingleIdentifier($this->getSnowflakeUser()),
),
);
}
Expand Down

0 comments on commit fe57b22

Please sign in to comment.