Skip to content

Commit

Permalink
fix: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumDancer committed Apr 4, 2024
1 parent f41c7e5 commit 527be78
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions auditor/tests/api/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use fake::{Fake, Faker};

#[tokio::test]
async fn add_returns_a_200_for_valid_json_data() {
// Arange
// Arrange
let app = spawn_app().await;

// Act
Expand Down Expand Up @@ -71,7 +71,7 @@ async fn add_returns_a_200_for_valid_json_data() {

#[tokio::test]
async fn add_returns_a_400_for_invalid_json_data() {
// Arange
// Arrange
let app = spawn_app().await;

let forbidden_strings: Vec<String> = ['/', '(', ')', '"', '<', '>', '\\', '{', '}']
Expand Down
18 changes: 9 additions & 9 deletions auditor/tests/api/advanced_queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::collections::HashMap;

#[tokio::test]
async fn get_advanced_queries_returns_a_200_and_list_of_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down Expand Up @@ -65,7 +65,7 @@ async fn get_advanced_queries_returns_a_200_and_list_of_records() {

#[tokio::test]
async fn get_started_since_returns_a_list_of_sorted_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down Expand Up @@ -146,7 +146,7 @@ async fn get_started_since_returns_a_200_and_no_records() {

#[tokio::test]
async fn get_stopped_since_returns_a_200_and_list_of_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down Expand Up @@ -205,7 +205,7 @@ async fn get_stopped_since_returns_a_200_and_list_of_records() {

#[tokio::test]
async fn get_stopped_since_returns_a_list_of_sorted_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down Expand Up @@ -288,7 +288,7 @@ async fn get_stopped_since_returns_a_200_and_no_records() {
// Test should return the same meta data which are added to auditor using 'contains' operator
#[tokio::test]
async fn get_meta_queries_c_returns_a_200_and_list_of_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down Expand Up @@ -353,7 +353,7 @@ async fn get_meta_queries_c_returns_a_200_and_list_of_records() {

#[tokio::test]
async fn get_component_query_returns_a_200_and_list_of_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down Expand Up @@ -411,7 +411,7 @@ async fn get_component_query_returns_a_200_and_list_of_records() {

#[tokio::test]
async fn sort_by_returns_a_200_and_list_of_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down Expand Up @@ -465,7 +465,7 @@ async fn sort_by_returns_a_200_and_list_of_records() {

#[tokio::test]
async fn limit_query_records_returns_a_200_and_list_of_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down Expand Up @@ -523,7 +523,7 @@ async fn limit_query_records_returns_a_200_and_list_of_records() {

#[tokio::test]
async fn exact_record_id_returns_a_200_and_list_of_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down
6 changes: 3 additions & 3 deletions auditor/tests/api/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use fake::{Fake, Faker};

#[tokio::test]
async fn add_records() {
// Arange
// Arrange
let app = spawn_app().await;
let client = AuditorClientBuilder::new()
.connection_string(&app.address)
Expand Down Expand Up @@ -98,7 +98,7 @@ async fn add_records() {

#[tokio::test]
async fn update_records() {
// Arange
// Arrange
let app = spawn_app().await;
let client = AuditorClientBuilder::new()
.connection_string(&app.address)
Expand Down Expand Up @@ -204,7 +204,7 @@ async fn update_records() {

#[tokio::test]
async fn get_returns_empty_list_of_records() {
// Arange
// Arrange
let app = spawn_app().await;
let client = AuditorClientBuilder::new()
.connection_string(&app.address)
Expand Down
4 changes: 2 additions & 2 deletions auditor/tests/api/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use fake::{Fake, Faker};

#[tokio::test]
async fn get_returns_a_200_and_list_of_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down Expand Up @@ -45,7 +45,7 @@ async fn get_returns_a_200_and_list_of_records() {

#[tokio::test]
async fn get_returns_a_list_of_sorted_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down
2 changes: 1 addition & 1 deletion auditor/tests/api/get_one_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use fake::{Fake, Faker};

#[tokio::test]
async fn get_one_record_returns_a_200_and_get_one_record() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down
8 changes: 4 additions & 4 deletions auditor/tests/api/get_since.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use fake::{Fake, Faker};

#[tokio::test]
async fn get_started_since_returns_a_200_and_list_of_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down Expand Up @@ -56,7 +56,7 @@ async fn get_started_since_returns_a_200_and_list_of_records() {

#[tokio::test]
async fn get_started_since_returns_a_list_of_sorted_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down Expand Up @@ -125,7 +125,7 @@ async fn get_started_since_returns_a_200_and_no_records() {

#[tokio::test]
async fn get_stopped_since_returns_a_200_and_list_of_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down Expand Up @@ -178,7 +178,7 @@ async fn get_stopped_since_returns_a_200_and_list_of_records() {

#[tokio::test]
async fn get_stopped_since_returns_a_list_of_sorted_records() {
// Arange
// Arrange
let app = spawn_app().await;

// First send a couple of records
Expand Down
4 changes: 2 additions & 2 deletions auditor/tests/api/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use fake::{Fake, Faker};

#[tokio::test]
async fn update_returns_a_404_for_non_existing_record() {
// Arange
// Arrange
let app = spawn_app().await;
let client = reqwest::Client::new();

Expand All @@ -24,7 +24,7 @@ async fn update_returns_a_404_for_non_existing_record() {

#[tokio::test]
async fn update_returns_a_200_for_valid_form_data() {
// Arange
// Arrange
let app = spawn_app().await;
let client = reqwest::Client::new();

Expand Down
12 changes: 6 additions & 6 deletions collectors/slurm/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub struct SiteConfig {

impl SiteConfig {
fn keys(&self) -> Option<KeyConfig> {
self.only_if.as_ref().map(|oif| oif.key())
self.only_if.as_ref().map(|only_if| only_if.key())
}
}

Expand All @@ -88,8 +88,8 @@ impl MetaConfig {
key_type: self.key_type,
allow_empty: self.key_allow_empty,
}];
if let Some(ref oif) = self.only_if {
keys.push(oif.key());
if let Some(ref only_if) = self.only_if {
keys.push(only_if.key());
}
keys
}
Expand Down Expand Up @@ -117,8 +117,8 @@ impl ComponentConfig {
key_type: self.key_type,
allow_empty: self.key_allow_empty,
});
if let Some(ref oif) = self.only_if {
keys.push(oif.key());
if let Some(ref only_if) = self.only_if {
keys.push(only_if.key());
}
keys
}
Expand All @@ -133,7 +133,7 @@ pub struct ScoreConfig {

impl ScoreConfig {
fn keys(&self) -> Vec<KeyConfig> {
self.only_if.iter().map(|oif| oif.key()).collect()
self.only_if.iter().map(|only_if| only_if.key()).collect()
}
}

Expand Down
2 changes: 1 addition & 1 deletion media/website/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ Therefore a mapping between resources and priorities needs to be in place.
This plugin offers two `computation_modes`: `FullSpread` and `ScaledBySum`.
Via `min_priority` and `max_priority`, lower and upper limits on the computed priority are set.

* `FullSpread`: This mode will spread the resources on the full range given by `min_priority` and `max_priority`, such that the group with the least provided resources will be assigned a priority equal to `min_priority` and the group with the most provided resources will be assigned a priority equal to `max_priority`. All other groups are distributed inside that range according to their provided resources. This creates maximum spread of the priorities. A disadvantage of this approach is that the computed priorites of two consecutive runs can be substantially different, leading to large jumps in priorities.
* `FullSpread`: This mode will spread the resources on the full range given by `min_priority` and `max_priority`, such that the group with the least provided resources will be assigned a priority equal to `min_priority` and the group with the most provided resources will be assigned a priority equal to `max_priority`. All other groups are distributed inside that range according to their provided resources. This creates maximum spread of the priorities. A disadvantage of this approach is that the computed priorities of two consecutive runs can be substantially different, leading to large jumps in priorities.
* `ScaledBySum`: Computes the priorities such that `max_priority` is equal to the sum of all provide resources plus `min_priority`. This leads to a smoother change of priorities over multiple runs of the plugin. The maximum priority can only be reached by a group if all other groups provide no resources.

# Auditor Clients
Expand Down

0 comments on commit 527be78

Please sign in to comment.