fn: clean api tests: removed multi log (#801)

fn-test-utils covers this, with sleep in between.
This commit is contained in:
Tolga Ceylan
2018-02-27 21:03:03 -08:00
committed by GitHub
parent b1827b5bfb
commit 820baf36dc
7 changed files with 114 additions and 153 deletions

View File

@@ -257,51 +257,6 @@ func TestCanCauseTimeout(t *testing.T) {
DeleteApp(t, s.Context, s.Client, s.AppName)
}
func TestMultiLog(t *testing.T) {
t.Parallel()
s := SetupDefaultSuite()
routePath := "/multi-log"
image := "funcy/multi-log:0.0.1"
routeType := "sync"
CreateApp(t, s.Context, s.Client, s.AppName, map[string]string{})
CreateRoute(t, s.Context, s.Client, s.AppName, routePath, image, routeType,
s.Format, s.Timeout, s.IdleTimeout, s.RouteConfig, s.RouteHeaders)
u := url.URL{
Scheme: "http",
Host: Host(),
}
u.Path = path.Join(u.Path, "r", s.AppName, routePath)
callID := CallSync(t, u, &bytes.Buffer{})
cfg := &operations.GetAppsAppCallsCallLogParams{
Call: callID,
App: s.AppName,
Context: s.Context,
}
logObj, err := s.Client.Operations.GetAppsAppCallsCallLog(cfg)
if err != nil {
t.Error(err.Error())
} else {
if logObj.Payload == "" {
t.Errorf("Log entry must not be empty!")
}
if !strings.Contains(logObj.Payload, "First line") {
t.Errorf("Log entry must contain `First line` "+
"string, but got: %v", logObj.Payload)
}
if !strings.Contains(logObj.Payload, "Second line") {
t.Errorf("Log entry must contain `Second line` "+
"string, but got: %v", logObj.Payload)
}
}
DeleteApp(t, s.Context, s.Client, s.AppName)
}
func TestCallResponseHeadersMatch(t *testing.T) {
t.Parallel()
s := SetupDefaultSuite()