<commit_before>import ./make-test-python.nix ({ pkgs, lib, ... }: {
  name = "mediawiki";
  meta.maintainers = [ lib.maintainers.aanderse ];

  machine =
    { ... }:
    { services.mediawiki.enable = true;
      services.mediawiki.virtualHost.hostName = "localhost";
      services.mediawiki.virtualHost.adminAddr = "<EMAIL>";
      services.mediawiki.passwordFile = pkgs.writeText "password" "<PASSWORD>";
      services.mediawiki.extensions = {
        Matomo = pkgs.fetchzip {
          url = "https://github.com/DaSchTour/matomo-mediawiki-extension/archive/v4.0.1.tar.gz";
          sha256 = "0g5rd3zp0avwlmqagc59cg9bbkn3r7wx7p6yr80s644mj6dlvs1b";
        };
        ParserFunctions = null;
      };
    };

  testScript = ''
    start_all()

    machine.wait_for_unit("phpfpm-mediawiki.service")

    page = machine.succeed("curl -L http://localhost/")
    assert "MediaWiki has been installed" in page
  '';
})<commit_msg>nixos/tests/mediawiki: Use curl --fail<commit_after>import ./make-test-python.nix ({ pkgs, lib, ... }: {
  name = "mediawiki";
  meta.maintainers = [ lib.maintainers.aanderse ];

  machine =
    { ... }:
    { services.mediawiki.enable = true;
      services.mediawiki.virtualHost.hostName = "localhost";
      services.mediawiki.virtualHost.adminAddr = "<EMAIL>";
      services.mediawiki.passwordFile = pkgs.writeText "password" "<PASSWORD>";
      services.mediawiki.extensions = {
        Matomo = pkgs.fetchzip {
          url = "https://github.com/DaSchTour/matomo-mediawiki-extension/archive/v4.0.1.tar.gz";
          sha256 = "0g5rd3zp0avwlmqagc59cg9bbkn3r7wx7p6yr80s644mj6dlvs1b";
        };
        ParserFunctions = null;
      };
    };

  testScript = ''
    start_all()

    machine.wait_for_unit("phpfpm-mediawiki.service")

    page = machine.succeed("curl -fL http://localhost/")
    assert "MediaWiki has been installed" in page
  '';
})
{'fraction_non_alphanumeric': 0.1459660297239915, 'fraction_numerical': 0.025477707006369428, 'mean_word_length': 2.894628099173554, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3711591', 'n_tokens_mistral': 676, 'n_tokens_neox': 636, 'n_words': 87}