Commit Graph

22 Commits

Author SHA1 Message Date
Oleksandr Redko 44b1dbe0f6 all: refactor to net/http statuses instead of ints 2023-01-24 08:39:29 -08:00
Oleksandr Redko 001c417e73
all: replace deprecated io/ioutil with io and os (#1647) 2023-01-23 10:25:14 -08:00
Brad Fitzpatrick 921894783b all: gofmt for Go 1.19
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
2022-12-31 22:45:40 -08:00
Eng Zer Jun 2977046a4c all: use `T.TempDir` to create temporary directory
The directory created by `T.TempDir()` and is automatically removed when
the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-03-04 08:18:24 -08:00
Brad Fitzpatrick 12894d4630 all: Windows fixes (don't listen on file descriptors in test.World, etc)
test/integration: don't listen on file descriptors.
make.go: unrelated, but options to make it much faster.
internal/images: t.Skip on HEIC dependency failures

Fixes #1140
Updates golang/go#25210

Change-Id: I8092155411826d6ed1f8d85230b753d1369044af
2018-05-01 21:38:19 -07:00
Brad Fitzpatrick c25b330d8d test/integration: fix tests after earlier change to root handler
In f8bc4ac6e5 I made the root handler start returning 404s for
unknown URLs, which broke this test. Update this tests.

Fixes #1132

Change-Id: I6e14811dda00e741d80e1c5603f849ffcb26f361
2018-04-29 10:15:21 -07:00
mpl 7a27eb42eb cmd: rename camget to pk-get, and make it a mode of pk
A couple of related fixes and renames too.

Updates #981
Fixes #1056

Change-Id: Id47a933c77422edfb9db41d34c38ed9d0d7a1846
2018-04-22 20:50:54 -07:00
Brad Fitzpatrick ca76a40bbc Rename camlistored to perkeepd.
Updates #981

Change-Id: I8fe43c240c149074c23128a89ab426af9cbf94b4
2018-04-21 11:06:09 -07:00
mpl ce4658abfc cmd: rename camput to pk-put, and make "pk put" call it
A new "put" mode is added to the pk command, so that the "pk put"
command can be used to create and upload blobs.

What this command does is actually just call the previously named
"camput" executable, which is renamed to "pk-put" in this change.

This involves adding a new way to register a mode in cmdmain, when such
a mode is just meant to call an external binary. To emphasize the
distinction, the existing func (to register a sub-command, or a mode) is
renamed from RegisterCommand to RegisterMode, and RegisterCommand is now
the name of the new func/way.

Updates #981
Updates #1056

Change-Id: Ief954c17aa88a376f551df7de4b4e9fe41ad96d1
2018-04-21 10:26:55 -07:00
Paul Lindner 990b613e2e pkg/test/integration: fix websocket integration test failures
In rev: 837fe8ac46 a new
version of websocket was imported and changes were made to use
origin checking.  This integration test was missed during those
changes.

This change fixes this test and adds the origin data to the
request, uses the correct 'ws' scheme and uses the new Dialer
API to make requests.

Change-Id: I93e8228794665012f15370532cdeda3cb702ea00
2018-01-12 06:24:38 -08:00
Brad Fitzpatrick 57648c6b83 all: update copyright holder from Google Inc to The Perkeep Authors
The AUTHORS file is the list of copyright holders.
2018-01-03 16:52:49 -08:00
Brad Fitzpatrick d6a0b05df0 Rename import paths from camlistore.org to perkeep.org.
Part of the project renaming, issue #981.

After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.

This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.

Also, this only moves the lru package to internal. More will move to
internal later.

Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.

This updates some docs, but not all.

devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).

Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
2018-01-01 16:03:34 -08:00
mpl 745f8516ea pkg/test/integration: make sure testing not linked in camlistored
I had to add the "-help" flag to camlistored, as otherwise relying on
the automatic usage gets us an exit status == 2, and hence an error when
running the Command.

fixes #475

Change-Id: I6f90329dbdb876a77c13d016f698de5026169e4a
2016-11-25 00:57:01 +01:00
Brad Fitzpatrick 7d326336cf search: remove broken websocket status optimization.
It was breaking the websocket integration test. We still need to
compute the last status message even if nobody is currently connected,
because when a websocket connection does arrive, we need to send the
last commputed status message.

Change-Id: Icea0fcc69941aa6249d32f0a4ef4ec03bdfb1e20
2016-04-26 09:29:39 -07:00
Brad Fitzpatrick 75d60962f6 Move remaining stuff in third_party/* to vendor/*
Change-Id: Ifbcc02817083cba68d8c1acec3e6ec50e8f61149
2016-04-20 16:49:15 -07:00
mpl 638c660227 test/integration: update TestWebsocketQuery
Because 6517bbc392 introduced automatic
status update message upon connection.

Change-Id: I17383930d97b38d2a4abf7a646aa291bf84d7014
2014-09-02 00:57:23 +02:00
mpl b4c684dd07 tests: ping camlistored before camput
Change-Id: Icf66bd5b990db07e9516b8ab8945cbf681caf25e
2014-02-24 19:57:44 +01:00
Brad Fitzpatrick 50c329d4a2 Add integration test for websocket query
Change-Id: I37c48d5749c7bf31aa118b2bee0861aeb07c5ff3
2014-02-07 15:02:22 -08:00
Brad Fitzpatrick f015c227f0 serverconfig: allow marking handlers as internal, so they're not accessible over HTTP
Change-Id: I37190e90fbc2560c07f742270c827f6025a2fb6f
2014-01-19 14:50:34 -08:00
Brad Fitzpatrick b84c2457ae Add integration test for Android camput environment.
Fixes camlistore.org/issue/323

Change-Id: Iefa5b073aa6d6b00899e7e17afb3bcf2f18ad6b3
2014-01-06 20:01:07 -08:00
Brad Fitzpatrick 0bdf20884b all: delete pkg/blobref; convert all from *blobref.BlobRef to new blob.Ref
Change-Id: Id2dfb7f19452bedf4f3c9310b36227fd8117b225
2013-08-03 19:54:30 -07:00
Brad Fitzpatrick 13fe0608fb Start of integration tests and a library to make them easy.
Change-Id: I24c55252d81d2170205f090a11a5c45473707e5d
2013-07-20 22:36:53 -07:00