mirror of
https://github.com/hanzoai/pubsub.git
synced 2026-10-30 15:06:26 +00:00
Overview: 1. Introduce dependency on antithesis-sdk-go (default NOOP variant) 2. Introduce assertions utilities suitable for use in tests 3. Instrument frequently used test utilities with the new assertions N.B. unless the `enable_antithesis_sdk` tag is specified at build time, both the SDK and the assertions wrappers are NOOP, and should have no effect. This will also facilitate other Antithesis one off experiments since developers no longer have to manually add the SDK to their branch.
28 lines
973 B
Go
28 lines
973 B
Go
// Copyright 2022-2024 The NATS Authors
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
// This file is used iff the `enable_antithesis_sdk` build tag is not present
|
|
//go:build !enable_antithesis_sdk
|
|
|
|
package antithesis
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// AssertUnreachable this implementation is a NOOP
|
|
func AssertUnreachable(_ testing.TB, _ string, _ map[string]any) {}
|
|
|
|
// Assert this implementation is a NOOP
|
|
func Assert(_ testing.TB, _ bool, _ string, _ map[string]any) {}
|