@@ -190,20 +190,21 @@ func TestAcc_GrantPrivilegesToShare_OnDynamicTable(t *testing.T) {
190190 share , shareCleanup := testClient ().Share .CreateShare (t )
191191 t .Cleanup (shareCleanup )
192192
193- dynamicTableId := testClient ().Ids .RandomSchemaObjectIdentifierInSchema (schema .ID ())
193+ id := testClient ().Ids .RandomSchemaObjectIdentifierInSchema (schema .ID ())
194194
195195 configVariables := config.Variables {
196196 "to_share" : config .StringVariable (share .ID ().Name ()),
197- "database" : config .StringVariable (database . ID (). Name ()),
198- "schema" : config .StringVariable (schema . ID (). Name ()),
197+ "database" : config .StringVariable (id . DatabaseName ()),
198+ "schema" : config .StringVariable (id . SchemaName ()),
199199 "warehouse" : config .StringVariable (TestWarehouseName ),
200- "on_table" : config .StringVariable (dynamicTableId .Name ()),
200+ "on_table" : config .StringVariable (id .Name ()),
201201 "privileges" : config .ListVariable (
202202 config .StringVariable (sdk .ObjectPrivilegeSelect .String ()),
203203 ),
204204 }
205205
206206 resourceName := "snowflake_grant_privileges_to_share.test"
207+
207208 resource .Test (t , resource.TestCase {
208209 ProtoV6ProviderFactories : TestAccProtoV6ProviderFactories ,
209210 PreCheck : func () { TestAccPreCheck (t ) },
@@ -218,7 +219,7 @@ func TestAcc_GrantPrivilegesToShare_OnDynamicTable(t *testing.T) {
218219 resource .TestCheckResourceAttr (resourceName , "to_share" , share .ID ().Name ()),
219220 resource .TestCheckResourceAttr (resourceName , "privileges.#" , "1" ),
220221 resource .TestCheckResourceAttr (resourceName , "privileges.0" , sdk .ObjectPrivilegeSelect .String ()),
221- resource .TestCheckResourceAttr (resourceName , "on_table" , dynamicTableId .FullyQualifiedName ()),
222+ resource .TestCheckResourceAttr (resourceName , "on_table" , id .FullyQualifiedName ()),
222223 ),
223224 },
224225 {
@@ -228,15 +229,6 @@ func TestAcc_GrantPrivilegesToShare_OnDynamicTable(t *testing.T) {
228229 ImportState : true ,
229230 ImportStateVerify : true ,
230231 },
231- {
232- ConfigDirectory : ConfigurationDirectory ("TestAcc_GrantPrivilegesToShare/OnDynamicTable" ),
233- ConfigVariables : configVariables ,
234- ConfigPlanChecks : resource.ConfigPlanChecks {
235- PostApplyPostRefresh : []plancheck.PlanCheck {
236- plancheck .ExpectEmptyPlan (),
237- },
238- },
239- },
240232 },
241233 })
242234}
0 commit comments