# Chapter 11 - Testing on Linux fails (possibly outdated dependencies?)

**URL:** <https://forums.kodeco.com/t/chapter-11-testing-on-linux-fails-possibly-outdated-dependencies/86113>\
**Category:** Server Side Swift with Vapor\
**Created:** [October 25, 2019, 3:45am UTC](https://forums.kodeco.com/t/chapter-11-testing-on-linux-fails-possibly-outdated-dependencies/86113 "2019-10-25T03:45:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![thedan84](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/thedan84/32/109266_2.png) [@thedan84](https://forums.kodeco.com/u/thedan84)\
**Post date:** [October 25, 2019, 3:45am UTC](https://forums.kodeco.com/t/chapter-11-testing-on-linux-fails-possibly-outdated-dependencies/86113/1 "2019-10-25T03:45:33Z")

</div>

Hello all. I’ve got a weird error when running `docker-compose up --abort-on-container-exit`. Seems like some dependencies aren’t compatible or something. Could someone please explain what’s going on and maybe suggest a fix?

![05](https://files.chunter.kodeco.com/original/3X/e/3/e3a94866c169c5148c4ae9222c778ef35e8409ff.jpeg)

---

<div class="post-metadata">

**Author:** ![0xtim](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/0xtim/32/111111_2.png) [@0xtim](https://forums.kodeco.com/u/0xtim)\
**Post date:** [November 4, 2019, 2:27pm UTC](https://forums.kodeco.com/t/chapter-11-testing-on-linux-fails-possibly-outdated-dependencies/86113/2 "2019-11-04T14:27:22Z")

</div>

@thedan84 have you updated the Swift version in the Dockerfiles? Could you post the docker file? 5.1 removed OpenSSL so you’d need to add that back in

---

<div class="post-metadata">

**Author:** ![thedan84](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/thedan84/32/109266_2.png) [@thedan84](https://forums.kodeco.com/u/thedan84)\
**Post date:** [November 4, 2019, 6:48pm UTC](https://forums.kodeco.com/t/chapter-11-testing-on-linux-fails-possibly-outdated-dependencies/86113/3 "2019-11-04T18:48:10Z")

</div>

@0xtim Here are the contents of the Dockerfile:

```
FROM swift:5.1

WORKDIR /package

COPY . ./

RUN swift package resolve
RUN swift package clean

CMD ["swift", "test"]

```

Yes, I have updated the Swift version in the Docker file, should I go back to 4.2 to make it work? Or just add OpenSSL to my Swift Package?

---

<div class="post-metadata">

**Author:** ![thedan84](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/thedan84/32/109266_2.png) [@thedan84](https://forums.kodeco.com/u/thedan84)\
**Post date:** [November 5, 2019, 10:21am UTC](https://forums.kodeco.com/t/chapter-11-testing-on-linux-fails-possibly-outdated-dependencies/86113/4 "2019-11-05T10:21:03Z")

</div>

I managed to get rid of the errors by changing the Swift version to 4.2.  
But now it fails because the Google and/or GitHub callback URLs aren’t set, although I’ve added them to the Environment variables. The tests succeed in Xcode, but I guess because the Xcode project is discarded when running the app in Linux the variables aren’t accessible anymore?

---

<div class="post-metadata">

**Author:** ![0xtim](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/0xtim/32/111111_2.png) [@0xtim](https://forums.kodeco.com/u/0xtim)\
**Post date:** [November 6, 2019, 2:31pm UTC](https://forums.kodeco.com/t/chapter-11-testing-on-linux-fails-possibly-outdated-dependencies/86113/5 "2019-11-06T14:31:36Z")

</div>

@thedan84 yeah you don’t have any access to the Xcode set environment variables inside Docker. One way I get around it is to hard code some test environment variables when you’re running tests (by looking to see if `env == .testing`). You can pass environment variables to your container with `-e GOOGLE_CALLBACK_URL=http://localhost:8080/` when doing `docker run`

For the language stuff - you can use `FROM swift 5.1.1` you just need to add [these lines](https://github.com/vapor/api-template/blob/master/web.Dockerfile#L8-L10) before you do any building

---

<div class="post-metadata">

**Author:** ![thedan84](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/thedan84/32/109266_2.png) [@thedan84](https://forums.kodeco.com/u/thedan84)\
**Post date:** [November 6, 2019, 2:53pm UTC](https://forums.kodeco.com/t/chapter-11-testing-on-linux-fails-possibly-outdated-dependencies/86113/6 "2019-11-06T14:53:00Z")

</div>

@0xtim Thanks a lot for the hints. Will try it out.
