<commit_before># This test runs pump.io with mongodb, listing on port 443.

import ./make-test.nix ({ pkgs, ...} : let
  snakeOilKey = ''
    <KEY>
    N8tzdx13tzV<KEY>
    -----END PRIVATE KEY-----
  '';

  snakeOilCert = ''
    -----BEGIN CERTIFICATE-----
    MIICvjCCAaagAwIBAgIJANhA6+PPhomZMA0GCSqGSIb3DQEBCwUAMBcxFTATBgNV
    BAMMDGIwOTM0YWMwYWZkNTAeFw0xNTExMzAxNzQ3MzVaFw0yNTExMjcxNzQ3MzVa
    MBcxFTATBgNVBAMMDGIwOTM0YWMwYWZkNTCCASIwDQYJKoZIhvcNAQEBBQADggEP
    ADCCAQoCggEBAKpV6aKjvxHjVPMydHbMUP/AVPSJJw6kWS7K02a49/bwUtpr3BIF
    <KEY>
    TBLZkOyWI21DAEslIi9fpdWdcugX8eYXj/JIn2kvYDFBcLBkTxJ8LMekCuz0I<KEY>
    V<KEY>
    -----END CERTIFICATE-----
  '';

  makePump = { opts ? { } }:
    {
      enable = true;
      sslCert = pkgs.writeText "snakeoil.cert" snakeOilCert;
      sslKey = pkgs.writeText "snakeoil.pem" snakeOilKey;
      secret = "test";
      site = "test";
    } // opts;

in {
  name = "pumpio";
  meta = with pkgs.stdenv.lib.maintainers; {
    maintainers = [ rvl ];
  };

  nodes = {
    one =
      { config, pkgs, ... }:
        {
          services = {
           pumpio = makePump { opts = {
             port = 443;
           }; };
           mongodb.enable = true;
           mongodb.extraConfig = ''
             nojournal = true
           '';
          };
          systemd.services.mongodb.unitConfig.Before = "pump.io.service";
          systemd.services."pump.io".unitConfig.Requires = "mongodb.service";
        };
    };

  testScript = ''
    startAll;

    $one->waitForUnit("pump.io.service");
    $one->waitUntilSucceeds("curl -k https://localhost");
  '';
})
<commit_msg>pump.io test: adapt mongodb extraConf to YAML<commit_after># This test runs pump.io with mongodb, listing on port 443.

import ./make-test.nix ({ pkgs, ...} : let
  snakeOilKey = ''
    -----BEGIN PRIVATE KEY-----
    <KEY>
    -----END PRIVATE KEY-----
  '';

  snakeOilCert = ''
    -----BEGIN CERTIFICATE-----
    MIICvjCCAaagAwIBAgIJANhA6+PPhomZMA0GCSqGSIb3DQEBCwUAMBcxFTATBgNV
    BAMMDGIwOTM0YWMwYWZkNTAeFw0xNTExMzAxNzQ3MzVaFw0yNTExMjcxNzQ3MzVa
    MBcxFTATBgNVBAMMDGIwOTM0YWMwYWZkNTCCASIwDQYJKoZIhvcNAQEBBQADggEP
    ADCCAQoCggEBAKpV6aKjvxHjVPMydHbMUP/AVPSJJw6kWS7K02a49/bwUtpr3BIF
    aa4AZsSLvAEh/Dz9tSoUFNCnYbWbVyZwIrGGa+86Qazz14zXfWzWVb9tdTfNiyjh
    7vvbiQfBTrmNGVCzpwVYiWZbtXncdChs/Tl3L7M+m6M89KU5DSphWJHWz5GBkjyv
    TBLZkOyWI21DAEslIi9fpdWdcugX8eYXj/JIn2kvYDFBcLBkTxJ8LMekCuz0I4ip
    NoC7AHv2TFZIVAl7CZpvvgFeIzr0UwK0c43bg+Xs5H2xEkcfyswTNS6ammZR4I0T
    MAGPNBDuy9HXxyZvNFZ62nS1P1juuPpREccCAwEAAaMNMAswCQYDVR0TBAIwADAN
    BgkqhkiG9w0BAQsFAAOCAQEAd2w9rxi6qF9WV8L3rHnTE7uu0ldtdgJlCASx6ouj
    TleOnjfEg+kH8r8UbmRV5vsTDn1Qp5JGDYxfytRUQwLb1zTLde0xotx37E3LY8Wr
    sD6Al4t8sHywB/hc5dy29TgG0iyG8LKZrkwytLvDZ814W3OwpN2rpEz6pdizdHNn
    jsoDEngZiDHvLjIyE0cDkFXkeYMGXOnBUeOcu4nfu4C5eKs3nXGGAcNDbDRIuLoE
    BZExUBY+YSs6JBvh5tvRqLVW0Dz0akEcjb/jhwS2LmDip8Pdoxx4Q1jPKEu38zrr
    Vd5WD2HJhLb9u0UxVp9vfWIUDgydopV5ZmWCQ5YvNepb1w==
    -----END CERTIFICATE-----
  '';

  makePump = { opts ? { } }:
    {
      enable = true;
      sslCert = pkgs.writeText "snakeoil.cert" snakeOilCert;
      sslKey = pkgs.writeText "snakeoil.pem" snakeOilKey;
      secret = "test";
      site = "test";
    } // opts;

in {
  name = "pumpio";
  meta = with pkgs.stdenv.lib.maintainers; {
    maintainers = [ rvl ];
  };

  nodes = {
    one =
      { config, pkgs, ... }:
        {
          services = {
           pumpio = makePump { opts = {
             port = 443;
           }; };
           mongodb.enable = true;
           mongodb.extraConfig = ''
             storage.journal.enabled: false
           '';
          };
          systemd.services.mongodb.unitConfig.Before = "pump.io.service";
          systemd.services."pump.io".unitConfig.Requires = "mongodb.service";
        };
    };

  testScript = ''
    startAll;

    $one->waitForUnit("pump.io.service");
    $one->waitUntilSucceeds("curl -k https://localhost");
  '';
})

{'fraction_non_alphanumeric': 0.11581348200709579, 'fraction_numerical': 0.039533705017739486, 'mean_word_length': 2.6991565135895033, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '82256', 'n_tokens_mistral': 1968, 'n_tokens_neox': 1839, 'n_words': 182}