Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
freeznet committed Dec 18, 2024
1 parent 2ac42dd commit 149ebaa
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions pulsar/resource_pulsar_topic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ func TestTopicNamespaceExternallyRemoved(t *testing.T) {
topicName := acctest.RandString(10)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProviderFactories: testAccProviderFactories,
IDRefreshName: resourceName,
CheckDestroy: testPulsarTopicDestroy,
PreCheck: func() { testAccPreCheck(t) },
ProviderFactories: testAccProviderFactories,
PreventPostDestroyRefresh: false,
CheckDestroy: testPulsarTopicDestroy,
Steps: []resource.TestStep{
{
Config: testPulsarNamespaceWithTopic(testWebServiceURL, tName, nsName, topicName),
Expand All @@ -133,8 +133,22 @@ func TestTopicNamespaceExternallyRemoved(t *testing.T) {
if err != nil {
t.Fatalf("ERROR_GETTING_TOPIC_NAME: %v", err)
}
if err = conn.Topics().Delete(*topicName, false, false); err != nil {
t.Fatalf("ERROR_DELETING_TEST_TOPIC: %v", err)
namespace, err := utils.GetNameSpaceName(topicName.GetTenant(), topicName.GetNamespace())
if err != nil {
t.Fatalf("ERROR_READ_NAMESPACE: %w", err)

Check failure on line 138 in pulsar/resource_pulsar_topic_test.go

View workflow job for this annotation

GitHub Actions / Run acceptance tests

(*testing.common).Fatalf does not support error-wrapping directive %w

Check failure on line 138 in pulsar/resource_pulsar_topic_test.go

View workflow job for this annotation

GitHub Actions / Run golangci-lint

printf: (*testing.common).Fatalf does not support error-wrapping directive %w (govet)
}

partitionedTopics, nonPartitionedTopics, err := conn.Topics().List(*namespace)
if err != nil {
t.Fatalf("ERROR_READ_TOPIC_DATA: %w", err)

Check failure on line 143 in pulsar/resource_pulsar_topic_test.go

View workflow job for this annotation

GitHub Actions / Run acceptance tests

(*testing.common).Fatalf does not support error-wrapping directive %w

Check failure on line 143 in pulsar/resource_pulsar_topic_test.go

View workflow job for this annotation

GitHub Actions / Run golangci-lint

printf: (*testing.common).Fatalf does not support error-wrapping directive %w (govet)
}

for _, topic := range append(partitionedTopics, nonPartitionedTopics...) {
if topicName.String() == topic {
if err = conn.Topics().Delete(*topicName, false, false); err != nil {
t.Fatalf("ERROR_DELETING_TEST_TOPIC: %v", err)
}
}
}
if err = conn.Namespaces().DeleteNamespace(tName + "/" + nsName); err != nil {
t.Fatalf("ERROR_DELETING_TEST_NS: %v", err)
Expand Down

0 comments on commit 149ebaa

Please sign in to comment.