diff --git a/create_mode_test.go b/create_mode_test.go index 240f102e..ff4dc158 100644 --- a/create_mode_test.go +++ b/create_mode_test.go @@ -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) diff --git a/zk_test.go b/zk_test.go index 407824ce..3db4d588 100644 --- a/zk_test.go +++ b/zk_test.go @@ -135,14 +135,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 } @@ -222,14 +222,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 }