Skip to content

Commit

Permalink
Change bldr/simple_service references to test/simple_service
Browse files Browse the repository at this point in the history
  • Loading branch information
reset authored and fnichol committed Nov 16, 2015
1 parent 4ce1bfe commit c0e839b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/bldr/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn upload_a_key_and_install_it() {
setup::gpg_import();
setup::simple_service();

let d = docker::repo("bldr/simple_service");
let d = docker::repo("test/simple_service");
let ipaddress = d.ipaddress();

let mut upload = command::bldr(&["key-upload", &util::path::fixture_as_string("chef-public"), "-u", &format!("http://{}:9632", ipaddress)]).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion tests/bldr/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn upload_a_package_and_then_install_it() {
setup::key_install();
setup::simple_service();

let d = docker::repo("bldr/simple_service");
let d = docker::repo("test/simple_service");
let ipaddress = d.ipaddress();

let mut upload = command::bldr(&["upload", "simple_service", "-u", &format!("http://{}:9632", ipaddress)]).unwrap();
Expand Down
14 changes: 7 additions & 7 deletions tests/bldr/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn standalone_no_options() {
setup::gpg_import();
setup::simple_service();

let d = docker::run("bldr/simple_service");
let d = docker::run("test/simple_service");
if d.wait_until(r"Shipping out to Boston") {
let output = d.logs();
assert_regex!(&output, r"Starting (.+)");
Expand All @@ -37,7 +37,7 @@ fn standalone_with_environment_config() {
setup::gpg_import();
setup::simple_service();

let d = docker::run_with_env("bldr/simple_service", "BLDR_simple_service=setting=\"blarg\"");
let d = docker::run_with_env("test/simple_service", "BLDR_simple_service=setting=\"blarg\"");
if d.wait_until(r"End Configuration") {
let output = d.logs();
assert_regex!(&output, r"setting: blarg");
Expand All @@ -52,7 +52,7 @@ fn standalone_with_discovery_config() {
util::discovery::clear("config");
util::discovery::set("config", "setting = \"sepultura\"");

let d = docker::run_with_etcd("bldr/simple_service");
let d = docker::run_with_etcd("test/simple_service");
assert_docker_log!(d, r"setting: sepultura");
}

Expand All @@ -64,7 +64,7 @@ fn standalone_with_discovery_config_updates() {
util::discovery::clear("config");

util::discovery::set("config", "setting = \"sepultura\"");
let d = docker::run_with_etcd("bldr/simple_service");
let d = docker::run_with_etcd("test/simple_service");
assert_docker_log!(d, r"setting: sepultura");

util::discovery::set("config", "setting = \"against me!\"");
Expand All @@ -80,9 +80,9 @@ fn leader_with_discovery() {
util::discovery::clear("topology");

util::discovery::set("config", "setting = \"rustacean\"");
let d1 = docker::run_with_etcd_topology("bldr/simple_service", "leader");
let d2 = docker::run_with_etcd_topology("bldr/simple_service", "leader");
let d3 = docker::run_with_etcd_topology("bldr/simple_service", "leader");
let d1 = docker::run_with_etcd_topology("test/simple_service", "leader");
let d2 = docker::run_with_etcd_topology("test/simple_service", "leader");
let d3 = docker::run_with_etcd_topology("test/simple_service", "leader");

assert_docker_log_count!(1, "Starting my term as leader", [ d1, d2, d3 ]);
assert_docker_log_count!(2, "Becoming a follower", [ d1, d2, d3 ]);
Expand Down
4 changes: 2 additions & 2 deletions tests/util/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use url;
use std::thread;

pub fn clear(key: &str) {
let url = format!("http://etcd:4001/v2/keys/bldr/simple_service/{}/{}?recursive=true", thread::current().name().unwrap_or("main"), key);
let url = format!("http://etcd:4001/v2/keys/test/simple_service/{}/{}?recursive=true", thread::current().name().unwrap_or("main"), key);
let client = Client::new();
let request = client.delete(&url);
let res = request.send().unwrap_or_else(|x| panic!("Error: {:?}; Failed to delete {}", x, url));
Expand All @@ -33,7 +33,7 @@ pub fn clear(key: &str) {
}

pub fn set(key: &str, body: &str) {
let url = format!("http://etcd:4001/v2/keys/bldr/simple_service/{}/{}", thread::current().name().unwrap_or("main"), key);
let url = format!("http://etcd:4001/v2/keys/test/simple_service/{}/{}", thread::current().name().unwrap_or("main"), key);
let client = Client::new();
let req_options = vec![("value", body)];
let req_body = url::form_urlencoded::serialize(&req_options);
Expand Down
2 changes: 1 addition & 1 deletion tests/util/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub fn run_with_etcd_topology(image: &str, topology: &str) -> Docker {

impl Docker {
pub fn ipaddress(&self) -> String {
let mut cmd = command::run("sh", &["-c", &format!(r#"docker inspect {} | grep \"IPAddress\" | awk 'BEGIN {{ FS = "\"" }}; {{ printf $4 }}'"#, &self.container_id)]).unwrap_or_else(|x| panic!("{:?}", x));
let mut cmd = command::run("sh", &["-c", &format!("docker inspect --format='{}' {}", "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}", &self.container_id)]).unwrap_or_else(|x| panic!("{:?}", x));
cmd.wait_with_output();
let ipaddress = String::from(cmd.stdout());
println!("I have ipaddress of {}", &cmd.stdout());
Expand Down

1 comment on commit c0e839b

@chef-delivery
Copy link
Contributor

Choose a reason for hiding this comment

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

Delivery Status:

Verify Build Acceptance
Unit Unit Provision
Lint Lint Deploy
Syntax Syntax Smoke
Quality Functional
Security
Publish

Please sign in to comment.