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

testsys: Update testsys commit to 07b9ae8 #2392

Merged
merged 3 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 25 additions & 15 deletions tools/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tools/testsys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ publish = false
anyhow = "1.0"
aws-config = "0.46"
aws-sdk-ec2 = "0.16"
bottlerocket-types = { git = "https://github.com/bottlerocket-os/bottlerocket-test-system", rev = "021e8d6", version = "0.1"}
bottlerocket-types = { git = "https://github.com/bottlerocket-os/bottlerocket-test-system", rev = "07b9ae8", version = "0.0.1"}
Copy link
Contributor

Choose a reason for hiding this comment

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

What needs to be done to track the latest commit/release?

bottlerocket-variant = { version = "0.1", path = "../../sources/bottlerocket-variant" }
clap = { version = "3", features = ["derive", "env"] }
env_logger = "0.9"
futures = "0.3.8"
k8s-openapi = { version = "0.15", features = ["v1_20", "api"], default-features = false }
log = "0.4"
maplit = "1.0.2"
model = { git = "https://github.com/bottlerocket-os/bottlerocket-test-system", rev = "021e8d6", version = "0.1"}
model = { git = "https://github.com/bottlerocket-os/bottlerocket-test-system", rev = "07b9ae8", version = "0.0.1"}
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably want to rename model to something like bottlerocket-test-model that doesn't clash with a published crate. bottlerocket-types could be bottlerocket-test-types also.

pubsys-config = { path = "../pubsys-config/", version = "0.1.0" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_plain = "1"
terminal_size = "0.1"
term_size = "0.3"
tokio = { version = "1", features = ["macros", "rt-multi-thread", "fs"] }
unescape = "0.1.0"
5 changes: 5 additions & 0 deletions tools/testsys/src/aws_resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ impl AwsK8s {
},
spec: ResourceSpec {
depends_on: None,
conflicts_with: None,
agent: Agent {
name: "eks-provider".to_string(),
image: testsys_images.eks_resource.clone(),
Expand Down Expand Up @@ -233,6 +234,7 @@ impl AwsK8s {
},
spec: ResourceSpec {
depends_on: Some(vec![cluster_name]),
conflicts_with: None,
agent: Agent {
name: "ec2-provider".to_string(),
image: testsys_images.ec2_resource.clone(),
Expand Down Expand Up @@ -284,6 +286,7 @@ impl AwsK8s {
mode: sonobuoy_mode,
kubernetes_version: None,
kube_conformance_image: self.kube_conformance_image.clone(),
e2e_repo_config_base64: None,
assume_role: self.assume_role.clone(),
}
.into_map()
Expand Down Expand Up @@ -493,6 +496,7 @@ impl AwsEcs {
},
spec: ResourceSpec {
depends_on: None,
conflicts_with: None,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like for ResourceSpec to implement the Default trait so we can populate these None fields automatically via ..Default::default().

agent: Agent {
name: "ecs-provider".to_string(),
image: testsys_images.ecs_resource.clone(),
Expand Down Expand Up @@ -548,6 +552,7 @@ impl AwsEcs {
},
spec: ResourceSpec {
depends_on: Some(vec![cluster_name]),
conflicts_with: None,
agent: Agent {
name: "ec2-provider".to_string(),
image: testsys_images.ec2_resource.clone(),
Expand Down
6 changes: 2 additions & 4 deletions tools/testsys/src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use anyhow::{Context, Result};
use clap::Parser;
use log::{debug, info};
use model::test_manager::{SelectionParams, TestManager};
use terminal_size::{Height, Width};

/// Check the status of testsys objects.
#[derive(Debug, Parser)]
Expand Down Expand Up @@ -45,10 +44,9 @@ impl Status {
.context("Could not create string from status.")?
);
} else {
let (terminal_size::Width(width), _) =
terminal_size::terminal_size().unwrap_or((Width(80), Height(0)));
let (width, _) = term_size::dimensions().unwrap_or((80, 0));
debug!("Window width '{}'", width);
println!("{}", status.to_string(width as usize));
println!("{:width$}", status.to_string());
}
Ok(())
}
Expand Down