From 22e25c3586f8cecc77d1ab78a541bcdb1aca6a06 Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Wed, 12 Aug 2020 08:00:42 +0300 Subject: [PATCH] minor --- HISTORY.md | 2 ++ _examples/logging/json-logger/main_test.go | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index ada69b92..d4deb1ac 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -361,6 +361,8 @@ Other Improvements: - Fix `AutoTLS` when used with `iris.TLSNoRedirect` [*](https://github.com/kataras/iris/issues/1577). The `AutoTLS` runner can be customized through the new `iris.AutoTLSNoRedirect` instead, read its go documentation. Example of having both TLS and non-TLS versions of the same application without conflicts with letsencrypt `./well-known` path: +![](https://iris-go.com/images/github/autotls-1.png) + ```go package main diff --git a/_examples/logging/json-logger/main_test.go b/_examples/logging/json-logger/main_test.go index a63262ee..70f02d85 100644 --- a/_examples/logging/json-logger/main_test.go +++ b/_examples/logging/json-logger/main_test.go @@ -50,6 +50,10 @@ func TestJSONLogger(t *testing.T) { got := out.String() got = got[strings.Index(got, "{"):] // take only the json we care and after. if expected != got { - t.Fatalf("expected:\n%s\nbut got:\n%s", expected, got) + if !strings.HasSuffix(got, expected) { + // C:/mygopath vs /home/travis vs any file system, + // pure check but it does the job. + t.Fatalf("expected:\n%s\nbut got:\n%s", expected, got) + } } }