Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
freeznet committed Jan 8, 2024
1 parent 90fbd8f commit f38da50
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions pulsar/resource_pulsar_sink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,31 +279,7 @@ func TestSinkUpdate(t *testing.T) {
{
Config: configString,
PlanOnly: true,
ExpectNonEmptyPlan: true,
},
{
Config: configString,
Check: resource.ComposeTestCheckFunc(func(s *terraform.State) error {
name := "pulsar_sink.update-sink-test-1"
rs, ok := s.RootModule().Resources[name]
if !ok {
return fmt.Errorf("%s not be found", name)
}

client := getClientFromMeta(testAccProvider.Meta()).Sinks()

parts := strings.Split(rs.Primary.ID, "/")
if len(parts) != 3 {
return errors.New("resource id should be tenant/namespace/name format")
}

_, err := client.GetSink(parts[0], parts[1], parts[2])
if err != nil {
return err
}

return nil
}),
ExpectNonEmptyPlan: false,
},
},
})
Expand Down

0 comments on commit f38da50

Please sign in to comment.