Skip to content

Commit

Permalink
Merge #928
Browse files Browse the repository at this point in the history
928: [settings] use hyphen in `primary-name` instead of underscore r=ChrisTownsend a=Saviq



Co-authored-by: Michał Sawicz <[email protected]>
  • Loading branch information
bors[bot] and Saviq committed Jul 22, 2019
2 parents 79b3ea7 + 0b83242 commit 53da2c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/multipass/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ constexpr auto client_name = "multipass";
constexpr auto daemon_name = "multipassd";
constexpr auto min_memory_size = "128M";
constexpr auto min_disk_size = "512M";
constexpr auto petenv_key = "client.primary_name"; // This will eventually be moved to some dynamic settings schema
constexpr auto petenv_key = "client.primary-name"; // This will eventually be moved to some dynamic settings schema
constexpr auto driver_key = "local.driver"; // idem
constexpr auto driver_env_var = "MULTIPASS_VM_DRIVER";
} // namespace multipass
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1335,13 +1335,13 @@ TEST_F(Client, set_cmd_fails_with_no_arguments)
TEST_F(Client, get_cmd_fails_with_multiple_arguments)
{
EXPECT_CALL(mock_settings, get(_)).Times(0);
EXPECT_THAT(send_command({"get", "client.primary_name", "local.driver"}), Eq(mp::ReturnCode::CommandLineError));
EXPECT_THAT(send_command({"get", "client.primary-name", "local.driver"}), Eq(mp::ReturnCode::CommandLineError));
}

TEST_F(Client, set_cmd_fails_with_multiple_arguments)
{
EXPECT_CALL(mock_settings, set(_, _)).Times(0);
EXPECT_THAT(send_command({"set", "client.primary_name=asdf", "local.driver=qemu"}),
EXPECT_THAT(send_command({"set", "client.primary-name=asdf", "local.driver=qemu"}),
Eq(mp::ReturnCode::CommandLineError));
}

Expand Down

0 comments on commit 53da2c1

Please sign in to comment.