Property-Based Testing with Clojure and Datomic – Part 2

This is the second part of a series that explores clojure.spec, property-based testing, and how those tools can be used to test Datomic. Check out part 1 for an introduction to clojure.spec and property-based testing. All of the code from this post is in the example repo

As we discussed in the first post, property-based testing works well for pure functions but that excludes a good chunk of code we would like to thoroughly test such as code that makes updates to a database. I also hinted that Datomic is uniquely suited to be tested by property-based tests.
Continue reading “Property-Based Testing with Clojure and Datomic – Part 2”

Property-Based Testing with Clojure and Datomic – Part 1

This is the first part of a multi-part series that explores clojure.spec, property-based testing, and how those tools can be used to test Datomic. This post serves mainly as an introduction to property-based testing and clojure.spec. Check out part 2 for the introduction of Datomic property-based testing.

Clojure.spec was recently released and the Clojure community is diving into it to see how specs can improve their programs. One of the more interesting design decisions made for clojure.spec is the connection between specs and property-based testing via another Clojure contrib library:
test.check.
Continue reading “Property-Based Testing with Clojure and Datomic – Part 1”

Docker’s dirty little secret

Docker isn’t what I thought it was.

I thought it provided a way to run docker images on any host that supported docker. As it turns out, that’s not true.

I first encountered something fishy when I found this docker image on Docker Hub, whose description said, “FreeBSD Docker host is required to run this image.” I thought, “How is that even possible?” And sure enough, I could run the image just fine with a FreeBSD host. But when I tried to run it on my iMac, it silently failed. How could this be?

Continue reading “Docker’s dirty little secret”