Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffbean committed Jul 4, 2024
1 parent a726174 commit 58019c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion create_mode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestParseCreateMode(t *testing.T) {
for _, tt := range changeDetectorTests {
t.Run(tt.name, func(t *testing.T) {
cm, err := parseCreateMode(tt.flag)
requireNoError(t, err)
requireNoErrorf(t, err)
if cm.toFlag() != tt.wantIntValue {
// change detector test for enum values.
t.Fatalf("createmode value of flag; want: %v, got: %v", cm.toFlag(), tt.wantIntValue)
Expand Down
8 changes: 4 additions & 4 deletions zk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ func TestIntegration_CreateTTL(t *testing.T) {
const testPath = "/ttl_znode_tests"
// create sub node to create per test in avoiding using the root path.
_, err = zk.Create(testPath, nil /* data */, FlagPersistent, WorldACL(PermAll))
requireNoError(t, err)
requireNoErrorf(t, err)

for idx, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
path := filepath.Join(testPath, fmt.Sprint(idx))
_, err := zk.CreateTTL(path, []byte{12}, tt.createFlags, WorldACL(PermAll), tt.giveDuration)
if tt.wantErr == "" {
requireNoError(t, err, fmt.Sprintf("error not expected: path; %q; flags %v", path, tt.createFlags))
requireNoErrorf(t, err, fmt.Sprintf("error not expected: path; %q; flags %v", path, tt.createFlags))
return
}

Expand Down Expand Up @@ -223,14 +223,14 @@ func TestIntegration_CreateContainer(t *testing.T) {
const testPath = "/container_test_znode"
// create sub node to create per test in avoiding using the root path.
_, err = zk.Create(testPath, nil /* data */, FlagPersistent, WorldACL(PermAll))
requireNoError(t, err)
requireNoErrorf(t, err)

for idx, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
path := filepath.Join(testPath, fmt.Sprint(idx))
_, err := zk.CreateContainer(path, []byte{12}, tt.createFlags, WorldACL(PermAll))
if tt.wantErr == "" {
requireNoError(t, err, fmt.Sprintf("error not expected: path; %q; flags %v", path, tt.createFlags))
requireNoErrorf(t, err, fmt.Sprintf("error not expected: path; %q; flags %v", path, tt.createFlags))
return
}

Expand Down

0 comments on commit 58019c3

Please sign in to comment.