Giter Club home page Giter Club logo

Comments (3)

jhillyerd avatar jhillyerd commented on May 28, 2024

I don't have an easy way to test with Go 1.21.2, but I did just try 1.21.3 w/ GitHub actions and the tests passed: https://github.com/inbucket/inbucket/actions/runs/6590987116/job/17908670578?pr=405

Do you have any character set or line ending specific configuration on your git client that may be modifying the test data?

from inbucket.

s4uliu5 avatar s4uliu5 commented on May 28, 2024

Do you have any character set or line ending specific configuration on your git client that may be modifying the test data?

I don't see anything unusual. Maybe we could compare files?

At my system

$ md5sum pkg/test/testdata/*

returns

fb7ea5446906d7e04af65d5e79f1b8eb  pkg/test/testdata/basic.golden
0ccbb8ed961a5c65f4d76840ddfa9051  pkg/test/testdata/basic.txt
a088a81447ffc1dcde3ec37f12073b39  pkg/test/testdata/encodedheader.golden
ac4f807b0e94313db56b833fd06e19ea  pkg/test/testdata/encodedheader.txt
6faf0a57ae16a6c18e46b092495b3c1a  pkg/test/testdata/fullname.golden
94ad5b4bfbf327a46cfb02c620410b58  pkg/test/testdata/fullname.txt
54886a468c3aea587e021658a23a4f05  pkg/test/testdata/no-to-ipv4.golden
c53e0fac8b933c3a1f0552f724ab2e74  pkg/test/testdata/no-to-ipv6.golden
c96ce47aa1ffaf8b1e748c39711238e3  pkg/test/testdata/no-to.txt

from inbucket.

s4uliu5 avatar s4uliu5 commented on May 28, 2024

I made a small change to the test

diff --git a/pkg/test/integration_test.go b/pkg/test/integration_test.go
index c65bddc..918a715 100644
--- a/pkg/test/integration_test.go
+++ b/pkg/test/integration_test.go
@@ -83,6 +83,8 @@ func testBasic(t *testing.T) {
 
        // Compare to golden.
        got := formatMessage(msg)
+       src, _ := msg.GetSource()
+       t.Errorf("got:\n---\n%s|\n---\nlen: %d\nbytes:\n%x", src, len(src.Bytes()), src.Bytes())
        goldiff.File(t, got, "testdata", "basic.golden")
 }

and IMHO the difference in size is related to Received header

Received: from localhost ([127.0.0.1]) by inbucket
  for <[email protected]>; Sat, 21 Oct 2023 12:39:23 +0300 (EEST)

which contains the date, time and time zone (EEST in my case). For example if time zone is CST then the test should pass.

from inbucket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.