(t *testing.T)
| 37 | ) |
| 38 | |
| 39 | func TestCreateTopic(t *testing.T) { |
| 40 | checkError := func(err error) { |
| 41 | if err != nil { |
| 42 | t.Error(err) |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | cfg := &config.Config{} |
| 47 | admin, err := New(cfg) |
| 48 | checkError(err) |
| 49 | |
| 50 | topic := "persistent://public/default/testCreateTopic" |
| 51 | |
| 52 | topicName, err := utils.GetTopicName(topic) |
| 53 | checkError(err) |
| 54 | |
| 55 | err = admin.Topics().Create(*topicName, 0) |
| 56 | checkError(err) |
| 57 | |
| 58 | topicLists, err := admin.Namespaces().GetTopics("public/default") |
| 59 | checkError(err) |
| 60 | |
| 61 | for _, t := range topicLists { |
| 62 | if t == topic { |
| 63 | return |
| 64 | } |
| 65 | } |
| 66 | t.Error("Couldn't find topic: " + topic) |
| 67 | } |
| 68 | |
| 69 | func TestTopics_Properties(t *testing.T) { |
| 70 | t.Run("NonPartitioned", func(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…