Skip to content

Commit b336a91

Browse files
committed
Set charset instead of encoding in testlog content type
`encoding` doesn't do anything, the correct property is `charset`.
1 parent 0f0f198 commit b336a91

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

agent/src/artifact/upload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ fn upload_test_log(
639639
cwd.as_ref().map(|pb| pb.as_path()),
640640
&artifact,
641641
mode,
642-
Some("text/plain;encoding=utf-8"),
642+
Some("text/plain;charset=utf-8"),
643643
);
644644
}
645645

agent/tests/artifact/upload.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn test_logs_uploaded_to_buildkite() -> Result<()> {
1919
]);
2020
cmd.assert()
2121
.success()
22-
.stdout(predicates::ord::eq("buildkite-agent artifact upload --content-type text/plain;encoding=utf-8 src\\test\\shell\\bazel\\resource_compiler_toolchain_test\\test.log\n"));
22+
.stdout(predicates::ord::eq("buildkite-agent artifact upload --content-type text/plain;charset=utf-8 src\\test\\shell\\bazel\\resource_compiler_toolchain_test\\test.log\n"));
2323

2424
Ok(())
2525
}
@@ -37,7 +37,7 @@ fn test_logs_uploaded_to_buildkite() -> Result<()> {
3737
]);
3838
cmd.assert()
3939
.success()
40-
.stdout(predicates::ord::eq("buildkite-agent artifact upload --content-type text/plain;encoding=utf-8 src/test/shell/bazel/starlark_repository_test/shard_4_of_6/test_attempts/attempt_1.log\n"));
40+
.stdout(predicates::ord::eq("buildkite-agent artifact upload --content-type text/plain;charset=utf-8 src/test/shell/bazel/starlark_repository_test/shard_4_of_6/test_attempts/attempt_1.log\n"));
4141

4242
Ok(())
4343
}
@@ -139,7 +139,7 @@ fn test_logs_deduplicated() -> Result<()> {
139139
]);
140140
cmd.assert()
141141
.success()
142-
.stdout(predicates::str::contains("buildkite-agent artifact upload --content-type text/plain;encoding=utf-8 src/test/shell/bazel/starlark_repository_test/shard_4_of_6/test_attempts/attempt_1.log").count(1));
142+
.stdout(predicates::str::contains("buildkite-agent artifact upload --content-type text/plain;charset=utf-8 src/test/shell/bazel/starlark_repository_test/shard_4_of_6/test_attempts/attempt_1.log").count(1));
143143

144144
Ok(())
145145
}
@@ -178,7 +178,7 @@ fn test_running_json_file() -> Result<()> {
178178

179179
cmd.assert()
180180
.success()
181-
.stdout(predicates::str::contains("buildkite-agent artifact upload --content-type text/plain;encoding=utf-8 src/test/shell/bazel/starlark_repository_test/shard_4_of_6/test_attempts/attempt_1.log"));
181+
.stdout(predicates::str::contains("buildkite-agent artifact upload --content-type text/plain;charset=utf-8 src/test/shell/bazel/starlark_repository_test/shard_4_of_6/test_attempts/attempt_1.log"));
182182
Ok(())
183183
})
184184
}

0 commit comments

Comments
 (0)