@@ -164,6 +164,15 @@ testEntrypointJson = testGroup "Testing ContainerConfig JSON" [testSample1, test
164 Just (Entrypoint sampleEntrypointArr)
164 Just (Entrypoint sampleEntrypointArr)
165 sampleEntrypointArr = ["cmd", "--some-flag", "--some-flag2"]
165 sampleEntrypointArr = ["cmd", "--some-flag", "--some-flag2"]
167+testEnvVarJson :: TestTree
168+testEnvVarJson = testGroup "Testing EnvVar JSON" [testSampleEncode, testSampleDecode]
171+ testCase "Test toJSON" $ assert $ JSON.toJSON (EnvVar "cellar" "door") == JSON.String "cellar=door"
173+ testCase "Test fromJSON" $ assert $ (JSON.decode "\"cellar=door\"" :: Maybe EnvVar) ==
174+ Just (EnvVar "cellar" "door")
167integrationTests :: TestTree
176integrationTests :: TestTree
168integrationTests =
177integrationTests =
169 testGroup
178 testGroup
@@ -184,6 +193,7 @@ jsonTests =
184 , testLabelsJson
193 , testLabelsJson
185 , testLogDriverOptionsJson
194 , testLogDriverOptionsJson
186 , testEntrypointJson
195 , testEntrypointJson
189setup :: IO ()
199setup :: IO ()