muan / emoji-cli

:ok_hand: Emoji searcher but as a CLI app.

Repository from Github https://github.commuan/emoji-cliRepository from Github https://github.commuan/emoji-cli

Make tests work in docker

muan opened this issue · comments

This is what I've got so far: https://github.com/muan/emoji-cli/compare/tests, and here's what I want to do:

  1. $ docker-compose run bintest
  2. Dockerfile-test installs xclip, sets up Xvfb so I have a display for xclip.
  3. Test calls emoji-cli poop and script copies 💩 to the clipboard.<< Not working
  4. Verify CLI output matches & clipboard content (xclip -o) matches

My futile attempts led me here opening an issue wishing I can source help from people who are more experienced in Docker than myself while documenting this of my own sanity. (my experience with docker dates back to the day I started this project. 😂)

I have tried many many things including CMD in docker compose file w/ bash -c, shelling the Xvfb command from the bintest rake task, and using xvfb-run -a xclip1 which led me me to more errors which I then failed to solve... 🙇

When running these in docker-compose run shell the command just hangs and errors out with XSELINUXs still allocated at reset:

$ Xvfb :1 &
$ ./mruby/build/x86_64-pc-linux-gnu/bin/emoji-cli poop
# while this totes works right after
$ echo 'hello' | xclip -i
$ xclip -o
hello

Ugh. I think I just need to stop now and reconvene in the future.

a cat having no idea what it's doing


XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":99"
      after 10 requests (7 known processed) with 0 events remaining.

I have no idea what I'm doing either, but #2 seems to work. Enjoy!