Virtomize/mail2most

install error

kimsinhack opened this issue · 4 comments

hi. while installing mail2most i got error and could not find any information about this error
please help me out!!

Describe the bug
after clone the mail2most
move to mail2most folder and excute "mage build"
it print out error

all error reports are below----------------------------
cleaning up
? github.com/cseeger-epages/mail2most [no test files]
=== RUN TestLoadConfigNoFile
--- PASS: TestLoadConfigNoFile (0.00s)
=== RUN TestLoadConfigEmptyConfig
--- PASS: TestLoadConfigEmptyConfig (0.00s)
=== RUN TestLoadConfigNil
--- PASS: TestLoadConfigNil (0.00s)
=== RUN TestMail
--- PASS: TestMail (1.52s)
=== RUN TestNew
time="2020-05-04T15:34:32+09:00" level=error msg="unknown logformat using default" default=text logformat=doesnotexists
time="2020-05-04T15:34:32+09:00" level=error msg="unknown loglevel using default" default=info loglevel=doesnotexists
time="2020-05-04T15:34:32+09:00" level=error msg="can't open logfile" filepath=/tmp/doesnotexists/mail2most.log
--- PASS: TestNew (0.00s)
=== RUN TestFilters
--- PASS: TestFilters (0.00s)
=== RUN TestWriteToFile
--- PASS: TestWriteToFile (0.00s)
=== RUN TestRead
--- PASS: TestRead (0.00s)
=== RUN TestLogger
{"default":"stdout","level":"error","msg":"unknown log output using default","output":"foo","time":"2020-05-04T15:34:32+09:00"}
{"default":"text","level":"error","logformat":"bar","msg":"unknown logformat using default","time":"2020-05-04T15:34:32+09:00"}
{"filepath":"/tmp/doesnotexists/mail2most.log","level":"error","msg":"can't open logfile","time":"2020-05-04T15:34:32+09:00"}
{"default":"text","level":"error","logformat":"bar","msg":"unknown logformat using default","time":"2020-05-04T15:34:32+09:00"}
--- PASS: TestLogger (0.00s)
=== RUN TestLogging
--- PASS: TestLogging (0.00s)
=== RUN TestRun
TestRun: mail2most_test.go:28:
Error Trace: mail2most_test.go:28
Error: Not equal:
expected: "unexpected end of JSON input"
actual : "open /tmp/data.json: permission denied"

                            Diff:
                            --- Expected
                            +++ Actual
                            @@ -1 +1 @@
                            -unexpected end of JSON input
                            +open /tmp/data.json: permission denied
            Test:           TestRun

--- FAIL: TestRun (0.00s)
=== RUN TestParseHTML
--- PASS: TestParseHTML (0.01s)
=== RUN TestParseText
--- PASS: TestParseText (0.00s)
=== RUN TestMattermost
--- PASS: TestMattermost (1.96s)
FAIL
coverage: 45.1% of statements
FAIL github.com/cseeger-epages/mail2most/lib 3.502s
FAIL
Error: running "go test -v -cover ./... -coverprofile=coverage.out" failed with exit code 1

--other informations are below-----------------------------------------

Release version
mattermost version : 5.21.0
mail2most:
Mage Build Tool v1.9.0-12-g310e198
built with: go1.14.2

Architecture
CentOS Linux release 7.7.1908 (Core)
Intel(R) Xeon(R) CPU E5-2630

Additional context
Add any other context about the problem here.

Check your permissions:
open /tmp/data.json: permission denied"

Check your permissions:
open /tmp/data.json: permission denied"

i checked /tmp/ direction and there are no data.json file
and find / -name data.json show nothing.

about permission i logged into root permission and excuted all the commends.
the ~/plugins/mail2most folder was owned by root and mattermost, and didnot show any differnece.

did i miss something? or missunserstood?

@kimsinhack you can download the already build binary from the releases page.

If you do want to build it by yourself maybe for a specific architecture that is not covered (if its so please name it so i can add it in the release build process :P ) check if you have the latest go version (go 1.14 as of this writing).

What fails here are the tests (mage test) wich runs before building. Please check if your /tmp directory has correct permissions so that mail2most can create the nessesary files.

The failling test (TestRun) creates a /tmp/data.json file and tests various error cases.
(Works on my machine 😄 ).

closed due to inactivity, feel free to open again if nessesary.