mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
HTTP Triggers hookup (#1086)
* Initial suypport for invoking tiggers * dupe method * tighten server constraints * runner tests not working yet * basic route tests passing * post rebase fixes * add hybrid support for trigger invoke and tests * consoloidate all hybrid evil into one place * cleanup and make triggers unique by source * fix oops with Agent * linting * review fixes
This commit is contained in:
@@ -5,17 +5,17 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
var openEmptyJson = `{"id":"","name":"","app_id":"","fn_id":"","created_at":"0001-01-01T00:00:00.000Z","updated_at":"0001-01-01T00:00:00.000Z","type":"","source":""`
|
||||
var openEmptyJSON = `{"id":"","name":"","app_id":"","fn_id":"","created_at":"0001-01-01T00:00:00.000Z","updated_at":"0001-01-01T00:00:00.000Z","type":"","source":""`
|
||||
|
||||
var triggerJsonCases = []struct {
|
||||
var triggerJSONCases = []struct {
|
||||
val *Trigger
|
||||
valString string
|
||||
}{
|
||||
{val: &Trigger{}, valString: openEmptyJson + "}"},
|
||||
{val: &Trigger{}, valString: openEmptyJSON + "}"},
|
||||
}
|
||||
|
||||
func TestTriggerJsonMarshalling(t *testing.T) {
|
||||
for _, tc := range triggerJsonCases {
|
||||
for _, tc := range triggerJSONCases {
|
||||
v, err := json.Marshal(tc.val)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to marshal json into %s: %v", tc.valString, err)
|
||||
|
||||
Reference in New Issue
Block a user