@@ -163,6 +163,15 @@ testEntrypointJson = testGroup "Testing ContainerConfig JSON" [testSample1, test
163163 Just (Entrypoint sampleEntrypointArr)
164164 sampleEntrypointArr = ["cmd", "--some-flag", "--some-flag2"]
165165
166+testEnvVarJson :: TestTree
167+testEnvVarJson = testGroup "Testing EnvVar JSON" [testSampleEncode, testSampleDecode]
168+ where
169+ testSampleEncode =
170+ testCase "Test toJSON" $ assert $ JSON.toJSON (EnvVar "cellar" "door") == JSON.String "cellar=door"
171+ testSampleDecode =
172+ testCase "Test fromJSON" $ assert $ (JSON.decode "\"cellar=door\"" :: Maybe EnvVar) ==
173+ Just (EnvVar "cellar" "door")
174+
166175integrationTests :: TestTree
167176integrationTests =
168177 testGroup
@@ -183,6 +192,7 @@ jsonTests =
183192 , testLabelsJson
184193 , testLogDriverOptionsJson
185194 , testEntrypointJson
195+ , testEnvVarJson
186196 ]
187197
188198setup :: IO ()