Skip to content
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
6 changes: 4 additions & 2 deletions cli/cli/src/adopt/init_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,8 @@ mod tests {
let scratch = dx_test_scratch::scratch("dx-init-doc-rows-");
let root = scratch.path();
std::fs::write(root.join("app.py"), "print(1)\n").expect("source");
std::fs::create_dir(root.join("pkg")).expect("pkg");
std::fs::write(root.join("pkg/BUILD.bazel"), "dx_deployment(name = \"app\")\n").expect("build");
let rows = doc_rows();
let mut files = plan(root, "my_project", true, &Agent::ALL).expect("plan");
let gitlab =
Expand Down Expand Up @@ -931,13 +933,13 @@ mod tests {
}

#[test]
fn apply_adds_no_family_module_for_a_python_workspace() {
fn apply_adds_no_family_module_for_a_shell_workspace() {
let scratch = dx_test_scratch::scratch("dx-init-family-deps-");
let root = scratch.path();
let module =
"module(name = \"app\")\nbazel_dep(name = \"rules_dx\", version = \"0.0.0\")\n";
std::fs::write(root.join("MODULE.bazel"), module).expect("write");
std::fs::write(root.join("app.py"), "").expect("write");
std::fs::write(root.join("app.sh"), "").expect("write");
let (code, _out, err) = run(&invocation(&["init", "--apply"]), root);
assert_eq!(code, 0, "{err}");
let after = std::fs::read_to_string(root.join("MODULE.bazel")).expect("read");
Expand Down
2 changes: 1 addition & 1 deletion cli/cli/src/exec/error_boundary_launcher_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};
use std::time::{Duration, Instant};

const MODULE: &str = "module(name = \"acme_renamed\", version = \"1.2.3\")\nbazel_dep(name = \"rules_dx\", version = \"0.0.0\")\n";
const MODULE: &str = "module(name = \"acme_renamed\", version = \"1.2.3\")\nbazel_dep(name = \"rules_dx\", version = \"0.0.0\")\nbazel_dep(name = \"rules_dx_python\", version = \"0.0.0\")\nbazel_dep(name = \"rules_dx_rust\", version = \"0.0.0\")\n";

const FAKE_BAZEL: &str = r#"#!/bin/sh
case " $* " in *" --output_groups=dx_shards "*) exit 1 ;; esac
Expand Down
2 changes: 1 addition & 1 deletion cli/cli/src/exec/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ mod tests {
let module =
"module(name = \"app\")\nbazel_dep(name = \"rules_dx\", version = \"1.0.0\")\n";
harness.write_source("MODULE.bazel", module);
harness.write_source("app.py", "");
harness.write_source("app.sh", "");
harness.intended = Some(intended_witness("default", true, "", ""));
let (code, out, err) = harness.run(&["generate", "--apply"]);
assert_eq!(code, 0, "{out}{err}");
Expand Down
Loading