Skip to content

Commit 1a5d92c

Browse files
committed
Fix test compilation by using correct JobFile type
Tests in github/testdata and github/server were using buildomat_github_database::types::JobFile which lacks the parse_content_at_path method. Switch to buildomat_jobsh::jobfile::JobFile which has the parsing functionality needed by the tests.
1 parent efbe776 commit 1a5d92c

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/server/src/variety/basic.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ use buildomat_client::types::{DependSubmit, JobOutput};
88
use buildomat_common::*;
99
use buildomat_download::PotentialRange;
1010
use buildomat_github_database::{types::*, Database};
11-
use buildomat_jobsh::variety::basic::{output_sse, output_table, BasicConfig};
11+
use buildomat_jobsh::variety::basic::{
12+
output_sse, output_table, BasicConfig, BasicConfigPublish,
13+
};
1214
use chrono::SecondsFormat;
1315
use dropshot::Body;
1416
use futures::{FutureExt, StreamExt, TryStreamExt};
@@ -1315,6 +1317,7 @@ pub(crate) async fn cancel(
13151317
pub mod test {
13161318
use super::*;
13171319
use buildomat_github_testdata::*;
1320+
use buildomat_jobsh::jobfile::JobFile;
13181321

13191322
#[test]
13201323
fn basic_parse_basic() -> Result<()> {

github/testdata/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ doctest = false
1010
[dependencies]
1111
buildomat-common = { path = "../../common" }
1212
buildomat-github-database = { path = "../database" }
13+
buildomat-jobsh = { path = "../../jobsh" }
1314

1415
anyhow = { workspace = true }
1516
serde = { workspace = true }

github/testdata/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use buildomat_github_database::types::{CheckRunVariety, JobFile};
1+
use buildomat_jobsh::jobfile::{JobFile, Variety};
22

33
pub fn disabled0() -> (String, String) {
44
let path = ".github/buildomat/jobs/disabled0.sh";
@@ -106,7 +106,7 @@ pub fn real0() -> (String, String, Option<JobFile>) {
106106
let expect = Some(JobFile {
107107
path: path.to_string(),
108108
name: "helios / build TUF repo".to_string(),
109-
variety: CheckRunVariety::Basic,
109+
variety: Variety::Basic,
110110
config: serde_json::json!({
111111
"access_repos": [
112112
"oxidecomputer/amd-apcb",

0 commit comments

Comments
 (0)