github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/pkg/publisher/combo/fallback_test.go (about) 1 //go:build unit || !integration 2 3 package combo 4 5 import ( 6 "testing" 7 ) 8 9 func TestFallbackPublisher(t *testing.T) { 10 runTestCases(t, map[string]comboTestCase{ 11 "empty": {NewFallbackPublisher(), mockPublisher{}}, 12 "single": {NewFallbackPublisher(&healthyPublisher), healthyPublisher}, 13 "healthy": {NewFallbackPublisher(&errorPublisher, &healthyPublisher), healthyPublisher}, 14 "error": {NewFallbackPublisher(&errorPublisher, &errorPublisher), errorPublisher}, 15 }) 16 }