Skip to content

Commit ed47308

Browse files
ValentaTomasdianpopa
authored andcommitted
mmds: fix inaccurate error message
Signed-off-by: Tomas Valenta <valenta.and.thomas@gmail.com>
1 parent eba8f9b commit ed47308

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/mmds/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl fmt::Display for Error {
4242
),
4343
Error::NoTtlProvided => write!(
4444
f,
45-
"Token time to live value not found. Use `X-metadata-token-ttl_seconds` header to \
45+
"Token time to live value not found. Use `X-metadata-token-ttl-seconds` header to \
4646
specify the token's lifetime."
4747
),
4848
Error::ResourceNotFound(ref uri) => {
@@ -705,7 +705,7 @@ mod tests {
705705

706706
assert_eq!(
707707
Error::NoTtlProvided.to_string(),
708-
"Token time to live value not found. Use `X-metadata-token-ttl_seconds` header to \
708+
"Token time to live value not found. Use `X-metadata-token-ttl-seconds` header to \
709709
specify the token's lifetime."
710710
);
711711

tests/integration_tests/functional/test_mmds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ def test_mmds_v2_negative(test_microvm_with_api, network_config):
832832
cmd = f"curl -m 2 -s -X PUT http://{DEFAULT_IPV4}/latest/api/token"
833833
expected = (
834834
"Token time to live value not found. Use "
835-
"`X-metadata-token-ttl_seconds` header to specify "
835+
"`X-metadata-token-ttl-seconds` header to specify "
836836
"the token's lifetime."
837837
)
838838
_run_guest_cmd(ssh_connection, cmd, expected)

0 commit comments

Comments
 (0)