Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests to pass with -f-with-http #2382

Merged
merged 3 commits into from
Apr 8, 2022

Conversation

Gabriella439
Copy link
Collaborator

… partly by mocking some imports better and partly by
disabling some tests that are not worth the effort to mock.

Fixes #2380

… partly by mocking some imports better and partly by
disabling some tests that are not worth the effort to mock.

Fixes #2380
@hololeap
Copy link

This works on my end. However, I have a couple additional changes that I would like to propose: #2383

Also, this particular doctest is trying to make network calls:

-- >>> input auto "https://raw.githubusercontent.com/dhall-lang/dhall-haskell/18e4e9a18dc53271146df3ccf5b4177c3552236b/examples/True" :: IO Bool
-- True

I don't know of a way to easily disable a doctest without changing the way it renders in Haddock, so I asked.

Allows for disabling network-dependent tests independently of the `with-http`
flag.
@@ -375,13 +376,23 @@ import Dhall
--
-- ... and you can reference that expression either directly:
--
#if defined(WITH_HTTP) && defined(USE_HTTP_CLIENT_TLS) && defined(NETWORK_TESTS)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI, I'm not sure defined(USE_HTTP_CLIENT_TLS) is necessary here... 🤔

Copy link

@hololeap hololeap Mar 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(And here)

@Gabriella439 Gabriella439 merged commit c1c2a34 into master Apr 8, 2022
@Gabriella439 Gabriella439 deleted the gabriella/fix_without_http_tests branch April 8, 2022 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests fail to compile when with-http flag is disabled
2 participants