@@ -164,6 +164,15 @@ testEntrypointJson = testGroup "Testing ContainerConfig JSON" [testSample1, test
164164 Just (Entrypoint sampleEntrypointArr)
165165 sampleEntrypointArr = ["cmd", "--some-flag", "--some-flag2"]
166166
167+testEnvVarJson :: TestTree
168+testEnvVarJson = testGroup "Testing EnvVar JSON" [testSampleEncode, testSampleDecode]
169+ where
170+ testSampleEncode =
171+ testCase "Test toJSON" $ assert $ JSON.toJSON (EnvVar "cellar" "door") == JSON.String "cellar=door"
172+ testSampleDecode =
173+ testCase "Test fromJSON" $ assert $ (JSON.decode "\"cellar=door\"" :: Maybe EnvVar) ==
174+ Just (EnvVar "cellar" "door")
175+
167176integrationTests :: TestTree
168177integrationTests =
169178 testGroup
@@ -184,6 +193,7 @@ jsonTests =
184193 , testLabelsJson
185194 , testLogDriverOptionsJson
186195 , testEntrypointJson
196+ , testEnvVarJson
187197 ]
188198
189199setup :: IO ()