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

Fix favicon returning 500 inside container #3569

Merged
merged 2 commits into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions cmd/all-in-one/all_in_one_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func TestAllInOne(t *testing.T) {
if err := healthCheck(); err != nil {
t.Fatal(err)
}
// Check if the favicon icon is available
if err := faviconCheck(); err != nil {
t.Fatal(err)
}
createTrace(t)
getAPITrace(t)
getSamplingStrategy(t)
Expand Down Expand Up @@ -138,6 +142,18 @@ func healthCheck() error {
return fmt.Errorf("query service is not ready")
}

func faviconCheck() error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this one is testing the docker image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Yuri,
My understanding may be wrong but looking at this code https://github.com/jaegertracing/jaeger/blob/main/scripts/build-all-in-one-image.sh#L23-L32 it seems we first bring up the newly built all-in-one image and then run the integration test from this file against the container.

println("Checking favicon...")
resp, err := http.Get(queryURL + "/favicon.ico")
if err == nil && resp.StatusCode == http.StatusOK {
println("Favicon check successful")
return nil
} else {
println("Favicon check failed")
return fmt.Errorf("all-in-one failed to serve favicon icon")
}
}

func getServicesAPIV3(t *testing.T) {
req, err := http.NewRequest("GET", getServicesAPIV3URL, nil)
require.NoError(t, err)
Expand Down
1 change: 1 addition & 0 deletions docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ RUN apk add --update --no-cache ca-certificates mailcap

FROM $root_image
COPY --from=cert /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
Ashmita152 marked this conversation as resolved.
Show resolved Hide resolved
COPY --from=cert /etc/mime.types /etc/mime.types
1 change: 1 addition & 0 deletions docker/debug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ RUN if [[ "$TARGETARCH" == "s390x" || "$TARGETARCH" == "ppc64le" ]] ; then \
FROM $golang_image
COPY --from=build /go/bin/dlv /go/bin/dlv
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build /etc/mime.types /etc/mime.types