Skip to content

Commit 06d64a7

Browse files
authored
test: fix splite bundle test and update pulsar image (streamnative#663)
Signed-off-by: Zixuan Liu <[email protected]>
1 parent ee35e64 commit 06d64a7

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

pkg/ctl/namespace/split_bundle_test.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,34 @@ import (
2222
"testing"
2323

2424
"github.com/streamnative/pulsarctl/pkg/ctl/topic"
25-
"github.com/stretchr/testify/assert"
25+
"github.com/stretchr/testify/require"
2626
)
2727

2828
func TestSplitBundle(t *testing.T) {
2929
ns := "public/test-split-bundle-ns"
3030

3131
args := []string{"create", ns}
3232
_, execErr, _, _ := TestNamespaceCommands(createNs, args)
33-
assert.Nil(t, execErr)
33+
require.Nil(t, execErr)
3434

3535
args = []string{"split-bundle", ns, "--bundle", "0x80000000_0xc0000000"}
3636
_, execErr, _, _ = TestNamespaceCommands(splitBundle, args)
37-
assert.NotNil(t, execErr)
38-
errMsg := "code: 412 reason: Failed to find ownership for ServiceUnit:" + ns + "/0x80000000_0xc0000000"
39-
assert.Equal(t, execErr.Error(), errMsg)
37+
require.Nil(t, execErr)
4038

4139
args = []string{"create", ns + "/test-topic", "0"}
4240
_, _, argsErr, err := topic.TestTopicCommands(topic.CreateTopicCmd, args)
43-
assert.Nil(t, argsErr)
44-
assert.Nil(t, err)
41+
require.Nil(t, argsErr)
42+
require.Nil(t, err)
4543

4644
args = []string{"bundle-range", ns + "/test-topic"}
4745
out, execErr, _, _ := topic.TestTopicCommands(topic.GetBundleRangeCmd, args)
48-
assert.Nil(t, execErr)
46+
require.Nil(t, execErr)
4947

5048
bundle := strings.Split(out.String(), ":")[2]
5149
bundle = strings.TrimSpace(bundle)
5250

5351
args = []string{"split-bundle", ns, "--bundle", bundle}
5452
splitOut, execErr, _, _ := TestNamespaceCommands(splitBundle, args)
55-
assert.Nil(t, execErr)
56-
assert.Equal(t, splitOut.String(), "Split a namespace bundle: "+bundle+" successfully\n")
53+
require.Nil(t, execErr)
54+
require.Equal(t, splitOut.String(), "Split a namespace bundle: "+bundle+" successfully\n")
5755
}

scripts/run-integration-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e
33

44
readonly PROJECT_ROOT=`cd $(dirname $0)/..; pwd`
55
readonly IMAGE_NAME=pulsarctl-test
6-
readonly PULSAR_DEFAULT_VERSION="2.9.1.2"
6+
readonly PULSAR_DEFAULT_VERSION="2.9.2.9"
77
readonly PULSAR_VERSION=${PULSAR_VERSION:-${PULSAR_DEFAULT_VERSION}}
88

99
docker build --build-arg PULSAR_VERSION=${PULSAR_VERSION} \

0 commit comments

Comments
 (0)