Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build fails on "go test" #110

Open
djdejawu opened this issue Sep 15, 2023 · 3 comments
Open

Docker build fails on "go test" #110

djdejawu opened this issue Sep 15, 2023 · 3 comments

Comments

@djdejawu
Copy link

docker build .

 => [internal] load build context                                                                                                                0.3s
 => => transferring context: 101.41kB                                                                                                            0.2s
 => [builder 2/9] WORKDIR /src                                                                                                                   1.0s
 => [builder 3/9] RUN apt-get update -qq && apt-get install -qqy   build-essential   libsystemd-dev                                             13.3s
 => [builder 4/9] COPY go.mod go.sum ./                                                                                                          0.1s
 => [builder 5/9] RUN go mod download                                                                                                            8.1s
 => [builder 6/9] RUN go mod verify                                                                                                              1.6s
 => [builder 7/9] COPY . .                                                                                                                       0.1s
 => ERROR [builder 8/9] RUN go test                                                                                                              8.3s
------
 > [builder 8/9] RUN go test:
8.116 2023/09/15 11:09:13 Unsupported Line: Apr 26 10:55:19 tcc1 postfix/smtpd[21126]: warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied
8.116 2023/09/15 11:09:13 Unsupported Line: Apr 26 10:55:19 tcc1 postfix/smtpd[21126]: warning: SASL authentication failure: Password verification failed
8.117 2023/09/15 11:09:13 Unsupported Line: Dec 29 02:54:09 mail postfix/smtp[7648]: 732BB407C3: host mail.domain.com[1.1.1.1] said: 451 DT:SPM 163 mx13,P8CowECpNVM_oEVaenoEAQ--.23796S3 1514512449, please try again 15min later (in reply to end of DATA command)
8.117 2023/09/15 11:09:13 Unsupported Line: Feb 14 19:05:25 123-mail postfix/smtpd[1517]: table hash:/etc/postfix/virtual_mailbox_maps(0,lock|fold_fix) has changed -- restarting
8.117 2023/09/15 11:09:13 Unsupported Line: Mar 16 12:28:02 123-mail postfix/smtpd[16268]: fatal: file /etc/postfix/main.cf: parameter default_privs: unknown user name value: nobody
8.117 2023/09/15 11:09:13 Unsupported Line: Mar 16 23:30:44 123-mail postfix/qmgr[29980]: warning: please avoid flushing the whole queue when you have
8.117 2023/09/15 11:09:13 Unsupported Line: Mar 16 23:30:44 123-mail postfix/qmgr[29980]: warning: lots of deferred mail, that is bad for performance
8.118 --- FAIL: TestPostfixExporter_CollectFromLogline (0.00s)
8.118     --- FAIL: TestPostfixExporter_CollectFromLogline/Testing_levels_of_unsupported_entries (0.00s)
8.118         postfix_exporter_test.go:346:
8.118                   Error Trace:    postfix_exporter_test.go:346
8.118                                                           postfix_exporter_test.go:293
8.118                   Error:          Not equal:
8.118                                   expected: []string{"label:<name:\"level\" value:\"\" > label:<name:\"service\" value:\"smtpd\" > counter:<value:1 > ", "label:<name:\"level\" value:\"fatal\" > label:<name:\"service\" value:\"smtpd\" > counter:<value:1 > ", "label:<name:\"level\" value:\"warning\" > label:<name:\"service\" value:\"qmgr\" > counter:<value:2 > "}
8.118                                   actual  : []string{"label:<name:\"level\" value:\"fatal\" > label:<name:\"service\" value:\"smtpd\" > counter:<value:1 > ", "label:<name:\"level\" value:\"warning\" > label:<name:\"service\" value:\"qmgr\" > counter:<value:2 > ", "label:<name:\"level\" value:\"\" > label:<name:\"service\" value:\"smtpd\" > counter:<value:1 > "}
8.118
8.118                                   Diff:
8.118                                   --- Expected
8.118                                   +++ Actual
8.118                                   @@ -1,5 +1,5 @@
8.118                                    ([]string) (len=3) {
8.118                                   - (string) (len=88) "label:<name:\"level\" value:\"\" > label:<name:\"service\" value:\"smtpd\" > counter:<value:1 > ",
8.118                                     (string) (len=93) "label:<name:\"level\" value:\"fatal\" > label:<name:\"service\" value:\"smtpd\" > counter:<value:1 > ",
8.118                                   - (string) (len=94) "label:<name:\"level\" value:\"warning\" > label:<name:\"service\" value:\"qmgr\" > counter:<value:2 > "
8.118                                   + (string) (len=94) "label:<name:\"level\" value:\"warning\" > label:<name:\"service\" value:\"qmgr\" > counter:<value:2 > ",
8.118                                   + (string) (len=88) "label:<name:\"level\" value:\"\" > label:<name:\"service\" value:\"smtpd\" > counter:<value:1 > "
8.118                                    }
8.118                   Test:           TestPostfixExporter_CollectFromLogline/Testing_levels_of_unsupported_entries
8.118                   Messages:       Wrong number of unsupportedLogEntries
8.118 FAIL
8.120 exit status 1
8.120 FAIL      github.com/kumina/postfix_exporter      0.012s
------
Dockerfile:17
--------------------
  15 |     # Force the go compiler to use modules
  16 |     ENV GO111MODULE=on
  17 | >>> RUN go test
  18 |     RUN go build -o /bin/postfix_exporter
  19 |
--------------------
ERROR: failed to solve: process "/bin/sh -c go test" did not complete successfully: exit code: 1
@rdelaage
Copy link

same issue here

@maxkratz
Copy link

What were your exact steps to produce this error?

I checked out the latest commit and ran $ docker build -t $somename . and it worked fine.

@rdelaage
Copy link

Doesn't have the problem anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants