Files
go-sip/contracts/current_business_exchanges_test.go
T

22 lines
492 B
Go

package contracts
import (
"encoding/json"
"os"
"testing"
)
func TestCurrentMQTopologyRequiresOnlyBusinessExchanges(t *testing.T) {
body, err := os.ReadFile("schema/mq-topology.json")
if err != nil {
t.Fatal(err)
}
var topology map[string]json.RawMessage
if err := json.Unmarshal(body, &topology); err != nil {
t.Fatal(err)
}
if _, exists := topology["dead_letter_exchange"]; exists {
t.Fatal("unused dead-letter exchange must not be required by the current topology")
}
}