git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC/PATCH v3 05/16] t0400: add test for 'put' command

From
Christian Couder <christian.couder@gmail.com>
Date
Nov 30, 2016, 21:04 UTC
Message-ID
<20161130210420.15982-6-chriscool@tuxfamily.org>
In-Reply-To
<20161130210420.15982-1-chriscool@tuxfamily.org>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 t/t0400-external-odb.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/t/t0400-external-odb.sh b/t/t0400-external-odb.sh
index 0f1bb97f38..6c6da5cf4f 100755
--- a/t/t0400-external-odb.sh
+++ b/t/t0400-external-odb.sh
@@ -57,4 +57,13 @@ test_expect_success 'helper can retrieve alt objects' '
 	test_cmp expect actual
 '
 
+test_expect_success 'helper can add objects to alt repo' '
+	hash=$(echo "Hello odb!" | git hash-object -w -t blob --stdin) &&
+	test -f .git/objects/$(echo $hash | sed "s#..#&/#") &&
+	size=$(git cat-file -s "$hash") &&
+	git cat-file blob "$hash" | ./odb-helper put "$hash" "$size" blob &&
+	alt_size=$(cd alt-repo && git cat-file -s "$hash") &&
+	test "$size" -eq "$alt_size"
+'
+
 test_done
-- 
2.11.0.rc2.37.geb49ca6
Previous: Christian CouderNext: Christian Couder
Message 2 of 30 in “Add initial experimental external ODB support”
  1. 00/16 Add initial experimental external ODB supportChristian Couder, Nov 30, 2016
  2. 05/16 t0400: add test for 'put' commandChristian Couder, Nov 30, 2016
  3. 06/16 external odb: add write supportChristian Couder, Nov 30, 2016
  4. 16/16 t0420: add test with HTTP external odbChristian Couder, Nov 30, 2016
  5. 15/16 odb-helper: add 'store_plain_objects' to 'struct odb_helper'Christian Couder, Nov 30, 2016
  6. 14/16 lib-httpd: add apache-e-odb.confChristian Couder, Nov 30, 2016
  7. 01/16 Add initial external odb supportChristian Couder, Nov 30, 2016
  8. Junio C HamanoNov 30, 2016
  9. Jeff KingNov 30, 2016
  10. Christian CouderAug 3, 2017
  11. Christian CouderAug 3, 2017
  12. Jeff KingAug 3, 2017
  13. 09/16 Add GIT_NO_EXTERNAL_ODB env variableChristian Couder, Nov 30, 2016
  14. 10/16 Add t0410 to test external ODB transferChristian Couder, Nov 30, 2016
  15. 13/16 lib-httpd: add list.shChristian Couder, Nov 30, 2016
  16. 11/16 lib-httpd: pass config file to start_httpd()Christian Couder, Nov 30, 2016
  17. 07/16 external-odb: accept only blobs for nowChristian Couder, Nov 30, 2016
  18. 03/16 t0400: use --batch-all-objects to get all objectsChristian Couder, Nov 30, 2016
  19. 02/16 external odb foreachChristian Couder, Nov 30, 2016
  20. 12/16 lib-httpd: add upload.shChristian Couder, Nov 30, 2016
  21. Junio C HamanoNov 30, 2016
  22. Christian CouderDec 13, 2016
  23. Junio C HamanoDec 13, 2016
  24. Christian CouderDec 15, 2016
  25. 04/16 t0400: add 'put' command to odb-helper scriptChristian Couder, Nov 30, 2016
  26. 08/16 t0400: add test for external odb write supportChristian Couder, Nov 30, 2016
  27. Lars SchneiderDec 3, 2016
  28. Jeff KingDec 5, 2016
  29. Christian CouderDec 13, 2016
  30. Lars SchneiderDec 18, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.