Skip to content

Commit

Permalink
Merge #1038: Fix: wrong req type name in tracker checker output
Browse files Browse the repository at this point in the history
dbee825 fix: [#1037] wrong req type name in tracker checker outout (Jose Celano)

Pull request description:

  Fix wrong req type name in tracker checker output.

  Command:

  ```console
  $ TORRUST_CHECKER_CONFIG='{
      "udp_trackers": ["127.0.0.1:6969"],
      "http_trackers": [],
      "health_checks": []
  }' cargo run --bin tracker_checker
  ```

  ```output
     Compiling torrust-tracker v3.0.0-rc.1-develop (/home/josecelano/Documents/git/committer/me/github/torrust/torrust-tracker)
      Finished `dev` profile [optimized + debuginfo] target(s) in 15.42s
       Running `target/debug/tracker_checker`
  2024-09-11T09:44:57.432395Z  INFO torrust_tracker::console::clients::checker::service: Running checks for trackers ...
  ```

  Fixed output:

  ```json
  [
    {
      "Udp": {
        "Ok": {
          "remote_addr": "127.0.0.1:6969",
          "results": [
            [
              "Setup",
              {
                "Ok": null
              }
            ],
            [
              "Connect",
              {
                "Ok": null
              }
            ],
            [
              "Announce",
              {
                "Ok": null
              }
            ],
            [
              "Scrape",
              {
                "Ok": null
              }
            ]
          ]
        }
      }
    }
  ]
  ```

  The previous output was:

  ```json
  [
    {
      "Udp": {
        "Ok": {
          "remote_addr": "127.0.0.1:6969",
          "results": [
            [
              "Setup",
              {
                "Ok": null
              }
            ],
            [
              "Connect",
              {
                "Ok": null
              }
            ],
            [
              "Announce",
              {
                "Ok": null
              }
            ],
            [
              "Announce",
              {
                "Ok": null
              }
            ]
          ]
        }
      }
    }
  ]
  ```

ACKs for top commit:
  josecelano:
    ACK dbee825

Tree-SHA512: fc4d8f1317052e5d4061eb69b5104f281ee39d1a4381ad30c5ea7b7fa88618059d1533c40c1a9182a382a80f73bdea2841b357bbfc12fa18349181d3fd3ca0db
  • Loading branch information
josecelano committed Sep 11, 2024
2 parents e8a0073 + dbee825 commit befbe1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/console/clients/checker/checks/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub async fn run(udp_trackers: Vec<SocketAddr>, timeout: Duration) -> Vec<Result
.await
.map(|_| ());

checks.results.push((Check::Announce, check));
checks.results.push((Check::Scrape, check));
}

if checks.results.iter().any(|f| f.1.is_err()) {
Expand Down

0 comments on commit befbe1b

Please sign in to comment.