go-spatial / go-mbgl

Go bindings for Mapbox GL Native
16 stars 1 forks source link

Tests fail on Docker container #17

Open ear7h opened 6 years ago

ear7h commented 6 years ago

Running TestNewSnapshotter fails with the following error in a Docker container:

terminate called after throwing an instance of 'std::runtime_error'
  what():  Failed to open X display.

Running TestSnapshotterSnapshot fails with the following error:

mbgl.test: /go/src/github.com/go-spatial/go-mbgl/mapbox-gl-native/platform/default/run_loop.cpp:144: void mbgl::util::RunLoop::runOnce(): Assertion `tid == std::this_thread::get_id()' failed.
SIGABRT: abort
ear7h commented 6 years ago

The first error makes me think that the MapSnapshotter is not suitable for a server environment. And, we should use the atto approach and use the headless_frontend class.

ear7h commented 6 years ago

In addition the mapbox-gl-native repo has a similar bare-bones rendering tool which use headless_frontend.

https://github.com/mapbox/mapbox-gl-native/blob/master/bin/render.cpp#L86