@@ -172,14 +172,14 @@ configurationSpec = describe "configuration files" $ modifyMaxSuccess (const 1)
172
172
it " should fail due to passing wrong file path" $ monadicIO $ do
173
173
eLauncherOption <- run $ do
174
174
-- Path to the launcher file is incorrect
175
- let launcherOptionPath = LauncherOptionPath " this will fail"
175
+ let launcherOptionPath = LauncherOptionPath " this will fail" Nothing
176
176
withSystemTempDirectory " test-XXXXXX" $ \ tmpDir ->
177
177
withSetEnvs launcherOptionPath tmpDir $ decodeLauncherOption nullLogging launcherOptionPath
178
178
assert $ isLeft eLauncherOption
179
179
180
180
it " should fail due to missing env vars" $ monadicIO $ do
181
181
eLauncherOption <- run $ do
182
- let launcherOptionPath = LauncherOptionPath (configFullFilePath " launcher-config-mainnet.linux.yaml" )
182
+ let launcherOptionPath = LauncherOptionPath (configFullFilePath " launcher-config-mainnet.linux.yaml" ) Nothing
183
183
-- Not environment variables are set!
184
184
decodeLauncherOption nullLogging launcherOptionPath
185
185
assert $ isLeft eLauncherOption
@@ -191,15 +191,15 @@ configurationSpec = describe "configuration files" $ modifyMaxSuccess (const 1)
191
191
let val = String " this is not launcher option"
192
192
let yamlPath = tmpDir </> " launcher.yaml"
193
193
encodeFile yamlPath val
194
- let launcherOptionPath = LauncherOptionPath yamlPath
194
+ let launcherOptionPath = LauncherOptionPath yamlPath Nothing
195
195
withSetEnvs launcherOptionPath tmpDir $ decodeLauncherOption nullLogging launcherOptionPath
196
196
assert $ isLeft eLauncherOption
197
197
198
198
-- | Test that env var substitution works as expected on actual config files
199
199
testGetLauncherOption :: FilePath -> Spec
200
200
testGetLauncherOption configPath = it (" should be able to perform env substitution on config: " <> configPath) $ monadicIO $ do
201
201
eLauncherOption <- run $ do
202
- let launcherOptionPath = LauncherOptionPath (configFullFilePath configPath)
202
+ let launcherOptionPath = LauncherOptionPath (configFullFilePath configPath) Nothing
203
203
withSystemTempDirectory " test-XXXXXX" $ \ tmpDir ->
204
204
withSetEnvs launcherOptionPath tmpDir $ decodeLauncherOption nullLogging launcherOptionPath
205
205
run $ putTextLn $ show eLauncherOption
0 commit comments