@@ -163,6 +163,15 @@ testEntrypointJson = testGroup "Testing ContainerConfig JSON" [testSample1, test
163 Just (Entrypoint sampleEntrypointArr)
163 Just (Entrypoint sampleEntrypointArr)
164 sampleEntrypointArr = ["cmd", "--some-flag", "--some-flag2"]
164 sampleEntrypointArr = ["cmd", "--some-flag", "--some-flag2"]
166+testEnvVarJson :: TestTree
167+testEnvVarJson = testGroup "Testing EnvVar JSON" [testSampleEncode, testSampleDecode]
170+ testCase "Test toJSON" $ assert $ JSON.toJSON (EnvVar "cellar" "door") == JSON.String "cellar=door"
172+ testCase "Test fromJSON" $ assert $ (JSON.decode "\"cellar=door\"" :: Maybe EnvVar) ==
173+ Just (EnvVar "cellar" "door")
166integrationTests :: TestTree
175integrationTests :: TestTree
167integrationTests =
176integrationTests =
168 testGroup
177 testGroup
@@ -183,6 +192,7 @@ jsonTests =
183 , testLabelsJson
192 , testLabelsJson
184 , testLogDriverOptionsJson
193 , testLogDriverOptionsJson
185 , testEntrypointJson
194 , testEntrypointJson
188setup :: IO ()
198setup :: IO ()