From b65f03bf8f1058dfad431c6dbff248cc4f5d920a Mon Sep 17 00:00:00 2001 From: Andrew Gillis <11790789+gammazero@users.noreply.github.com> Date: Fri, 9 Aug 2024 11:51:12 -0700 Subject: [PATCH] fix(tar): test http status and not error string in body (#221) * Look for correct error message The error message in boxo was fixed to say "not allowed" instead of "now allowed". The message that the gateway conformance test looks for needs to match. * refactor: make test backward-compatible --------- Co-authored-by: Marcin Rataj --- CHANGELOG.md | 4 ++++ tests/path_gateway_tar_test.go | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcdeb3d3b..23292c465 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.6.2] - 2024-08-09 +### Changed +- Relaxed negative test of TAR response [#221](https://github.com/ipfs/gateway-conformance/pull/221) + ## [0.6.1] - 2024-07-29 ### Changed - Support meaningful `Cache-Control` on generated UnixFS directory listing responses on `/ipfs` namespace diff --git a/tests/path_gateway_tar_test.go b/tests/path_gateway_tar_test.go index 15f5c3805..a2f577f33 100644 --- a/tests/path_gateway_tar_test.go +++ b/tests/path_gateway_tar_test.go @@ -89,13 +89,12 @@ func TestTar(t *testing.T) { }, { Name: "GET TAR with relative paths outside root fails", + Hint: "relative UnixFS paths outside the root are not allowed", Request: Request(). Path("/ipfs/{{cid}}", outsideRootCID). Query("format", "tar"), Response: Expect(). - Body( - Contains("relative UnixFS paths outside the root are now allowed"), - ), + StatusBetween(400, 599), }, { Name: "GET TAR with relative paths inside root works",