github.com/sl1pm4t/consul@v1.4.5-0.20190325224627-74c31c540f9c/agent/structs/testing_intention.go (about) 1 package structs 2 3 import ( 4 "github.com/mitchellh/go-testing-interface" 5 ) 6 7 // TestIntention returns a valid, uninserted (no ID set) intention. 8 func TestIntention(t testing.T) *Intention { 9 return &Intention{ 10 SourceNS: "eng", 11 SourceName: "api", 12 DestinationNS: "eng", 13 DestinationName: "db", 14 Action: IntentionActionAllow, 15 SourceType: IntentionSourceConsul, 16 Meta: map[string]string{}, 17 } 18 }