Commit Graph

1763 Commits

Author SHA1 Message Date
Gus Eggert
b3f1d65af4 Revert "Disable MAKE_SKIP_PATH"
This reverts commit f0ae6e3417.
2021-08-13 16:38:24 -04:00
Gus Eggert
e162f1afb3 Revert "Remove MAKE_SKIP_PATH test"
This reverts commit 98d2739f45.
2021-08-13 16:37:09 -04:00
Gus Eggert
3a7eaaf7eb Revert "Remove MAKE_SKIP_PATH, update Dockerfile base image"
This reverts commit d3468407aa.
2021-08-13 16:33:31 -04:00
Gus Eggert
d3468407aa Remove MAKE_SKIP_PATH, update Dockerfile base image 2021-08-03 14:23:58 -04:00
Gus Eggert
db2684f388 Merge branch 'master' into update-go-on-ci-guseggert 2021-08-02 14:42:32 -04:00
Gus Eggert
98d2739f45 Remove MAKE_SKIP_PATH test 2021-08-02 14:29:21 -04:00
Gus Eggert
f0ae6e3417 Disable MAKE_SKIP_PATH 2021-08-02 13:50:10 -04:00
Adin Schmahmann
6de589c0c7
Merge pull request #8254 from ipfs/schomatis/chore/sharness/t0250/change-online-offline-naming
Disambiguate online/offline naming in sharness tests
2021-07-23 08:27:18 -07:00
Steven Allen
1ddb1c5c59
Merge pull request #8283 from ipfs/rvagg/rename-docker-host
Rename DOCKER_HOST to TEST_DOCKER_HOST to avoid conflicts
2021-07-22 07:56:45 -07:00
Steven Allen
0bea7ce6a9 test(sharness): test profile dump 2021-07-21 18:04:11 -07:00
Steven Allen
d52d183020 feat: add an "ipfs diag profile" command
This should replace the "collect-profiles.sh" script and allow users to
easily collect profiles.

At the moment, it just dumps all profiles into a single zip file. It
does this server-side so it's easy fetch them with curl.

In the future, it would be nice to add:

1. Progress indicators (cpu profiles take 30 seconds).
2. An option to specify which profiles to collect.

But we can handle that later.

Unfortunately, this command doesn't produce symbolized svgs as I didn't
want to depend on having a local go compiler.
2021-07-21 14:51:47 -07:00
Rod Vagg
8a7d5e9244
Rename DOCKER_HOST to TEST_DOCKER_HOST to avoid conflicts
DOCKER_HOST is a special environment variable of the Docker CLI
so there's risk of creating conflicts whenever attempting to use `docker`
in the test suite; it also makes it difficult to run the same full suite
locally using the same setup since DOCKER_HOST is a fixed variable in
t0700-remotepin.sh
2021-07-21 14:44:24 +10:00
Masih H. Derkani
1aa9c1a18f
Add test with expected failure for #3503
Write a `sharness` test that expects failure documenting the issue
raised in #3503. The issue may get resolved in the refactoring of
`ipfs dag get` command to support go-ipld-prime (e.g. #8171). For now
add a `sharness` test that expects failure. We will then flip the
expectation in the success in the rewriting PR to check if #3503 gets
resolved.

Relates to:
- https://github.com/ipfs/go-ipfs/issues/3503
2021-07-20 12:16:33 +01:00
Lucas Molas
c6a7d28497 remove blocking (now resolved) fixme 2021-07-12 15:54:56 -03:00
Lucas Molas
9561068548 propagate test_launch_ipfs_daemon_without_network name 2021-07-08 16:53:58 -03:00
Lucas Molas
61f58c21c4 fix(sharness): t0250: disambiguate online/offline 2021-07-08 16:53:58 -03:00
Steven Allen
0060d5f7c8 feat: programmatic shell completions
These are missing some of the features of the current hand-rolled
completions, but:

1. Are less buggy.
2. Cover _all_ commands.
3. Don't need to be manually maintained (which we never do anyways).

fixes #4551
fixes #8033
2021-07-01 08:46:49 -07:00
Marcin Rataj
fcfe79333c test: gateway response for bafkqaaa
Context: https://github.com/ipfs/go-ipfs/issues/8230
2021-06-30 15:36:39 -07:00
Marten Seemann
bc68e2d1c2 update go-tcp-transport to v0.2.2 2021-05-13 07:24:25 -07:00
Marten Seemann
473d7d5851 update quic-go to v0.21.0-rc.1 2021-05-12 19:17:52 -04:00
Adin Schmahmann
56f61d5dbd
Merge pull request #8128 from ipfs/chore/update-deps
chore: update deps
2021-05-12 15:37:08 -07:00
hannahhoward
2ef501dec8 fix(sharness): switch insecure hash function test
License: MIT
Signed-off-by: hannahhoward <hannah@hannahhoward.net>
2021-05-12 16:58:43 -04:00
Adin Schmahmann
c82485505f
Merge pull request #8113 from ipfs/feat/key-export-online
feat: allow key export in online mode
2021-05-12 11:46:35 -07:00
Marcin Rataj
6b63de8a5a
fix: check repo version before key export
https://github.com/ipfs/go-ipfs/pull/8113#discussion_r628314443
2021-05-11 19:43:51 +02:00
Marcin Rataj
48bc5735fc
test: confirm /api/v0/key/export is HTTP 404
This ensures key export endpoint is never exposed over HTTP API
2021-05-11 19:21:54 +02:00
Steven Allen
3b254a631f test(sharness): fix test for updated address filters 2021-05-10 21:34:49 -07:00
Marcin Rataj
a158036dee
feat: allow key export in online mode
Export does not require repo lock and it is safe to do even when ipfs
daemon is running. This enables apps like Brave browser to do
import/export without stopping/starting daemon.

Ref. https://github.com/brave/brave-browser/issues/15422
2021-05-07 16:26:23 +02:00
Oli Evans
0f1e5be1be
feat: expose dag/export on read-only gateway api
- add dag/export to read-only root. it's ready only, so why the heck not!
- test that i didn't expose other dag subcommands
§

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
2021-05-05 15:32:26 +01:00
Andrew Gillis
0ae9b2b903
Update migration sharness tests for new migrations (#8053)
* Update migration sharness tests for new migrations

With the new migrations, go-ipfs no longer uses fs-repo-migrations to do repo migrations, and was downloading real migration binaries from the network and running them.  This caused failure, but was not caught because the test was expecting `ipfs daemon --migrate` to fail for other reasons.

This PR fixes the migration tests by creating the appropriate fake migration binaries in the PATH so that those get run and avoid downloading the real ones.  This also fixes a test that was previously marked broken.
2021-04-15 14:47:11 -04:00
Steven Allen
873b913858
Merge pull request #8020 from ipfs/dependabot/go_modules/contrib.go.opencensus.io/exporter/prometheus-0.3.0
build(deps): bump contrib.go.opencensus.io/exporter/prometheus from 0.2.0 to 0.3.0
2021-04-01 12:10:16 -07:00
Steven Allen
4cdb67f37d
Merge pull request #7890 from ipfs/fix/remove-clear-site-data
fix(gw): remove use of Clear-Site-Data in subdomain router
2021-03-31 16:24:24 -07:00
Steven Allen
ca53af5adb test(sharness): fix for opencensus updates 2021-03-30 17:07:55 -07:00
Steven Allen
18cbd490d7
Merge pull request #7987 from ipfs/test/metrics
test(sharness): verify the list of exported metrics
2021-03-24 16:00:46 -07:00
Steven Allen
d30f1e5d44
Merge pull request #7930 from ipfs/fix/redundant-ns-on-gateway
feat(gw): /ipfs/ipfs/{cid} → /ipfs/{cid}
2021-03-24 13:12:16 -07:00
Steven Allen
60e2c54db1 test(sharness): verify the list of exported metrics
We'll have to update this "golden" list as we add/remove metrics, but
this will at least warn us if something changes.
2021-03-17 15:04:38 -07:00
Steven Allen
eb53fc7c34 test(sharness): pass correct timeout format to go-timeout
It takes a number, not a duration. Unfortunately, it will _also_ exit
with a status of 1 in this case so the test passes.
2021-03-10 17:34:13 -08:00
Marcin Rataj
dae7387584
refactor: show error, delay redirect
This implements error page that does not hide the problem,
but still redirects to a valid path after short delay:
https://github.com/ipfs/go-ipfs/pull/7930#issuecomment-786882748
2021-02-27 00:57:05 +01:00
Steven Allen
6a13d86148 test(sharness): correctly use test_must_fail 2021-02-25 14:17:09 -08:00
Steven Allen
ccc2d23730 feat: remove secio support
We've had a reliable and enabled by default TLS implementation since
0.4.23 (over a year ago) and turned off SECIO in September of last year.
We might as well remove support entirely in the next release and
encourage users to upgrade their networks.

Noise is faster, anyways.
2021-02-25 13:36:40 -08:00
Marcin Rataj
15e3732afd
feat(gw): /ipfs/ipfs/{cid} → /ipfs/{cid}
This will try to recover from invalid paths like  /ipfs/ipfs/{cid}
and redirect to proper one, when possible.
2021-02-20 00:09:17 +01:00
Steven Allen
fed5f05134 build: simplify on gofmt 2021-02-08 12:44:15 -08:00
Marcin Rataj
d61ae2bcb4
fix: remove use of Clear-Site-Data
We used Clear-Site-Data to cushion transition period for local gateway
exposed at http://localhost while we were still figuring out
security-related details.

In the final implementation subdomain gateways are not tied to a
hostname explicitly, which removes the risk of cookies leaking,
removing the need for the header.

Turns out it causes issues for Firefox users, so let's just remove it.

Closes https://github.com/ipfs-shipyard/ipfs-companion/issues/977
2021-01-29 22:08:16 +01:00
Petar Maymounkov
8794928c31
add remote pinning policy for mfs (#7798)
* remote pinning service MFS policy
* update go-ipfs-config
* hardening secret sanitization in `ipfs config` commands

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-01-28 18:58:44 -05:00
Andrew Gillis
6f6f04543b
Improve error message when running key command that locks repo (#7821)
* Improve error message when running key commands that must be run when the daemon is not already running

Fixes Issue #7814

`ipfs key export` now does a PreRun check like `ipfs key rotate` was to give a better error to the user then "someone else has the lock" in the event that the daemon is running while trying to execute these offline-only commands.

While unlikely the "someone else has the lock" error can still be shown if two processes try and grab the repo lock at the same time.

This PreRun function is also exported so it can be used by `ipfs init` where it was originally copied from.

* Added more `ipfs key` command tests

When daemon is running:
- Test that import works
- Test that export fails
- Test that rotate fails
2021-01-28 15:15:49 -05:00
Adin Schmahmann
e0d484431a test: add sharness tests for remote pinning service endpoints that are not http(s) URIs 2021-01-27 19:28:58 -05:00
Adin Schmahmann
7588a6a52a
Merge pull request #7829 from ipfs/fix/pin-remote-service-ls-json
fix: remote services ls always return a list
2021-01-14 17:37:40 -05:00
Marcin Rataj
216b858f8a
test: JSON response on empty remote service ls 2021-01-14 21:07:23 +01:00
Marcin Rataj
cdad39479c test: sharness for ?uri= router
Additional tests to ensure there are no regressions, as this will be
used by browser vendors in the future.
2021-01-14 20:53:17 +01:00
Adin Schmahmann
4ccb526b94
Merge pull request #7847 from ipfs/fix/dnslink-in-subdomain-gw
feat(gw): DNSLink names on https:// subdomains
2021-01-14 14:50:04 -05:00
Marcin Rataj
09178aa717
feat(gw): support inlined DNSLink names with TLS
Problem statement and rationale for doing this can be found under
"Option C" at: https://github.com/ipfs/in-web-browsers/issues/169

TLDR is:

`https://dweb.link/ipns/my.v-long.example.com` can be loaded from a
subdomain gateway with a wildcard TLS cert if represented as a single
DNS label: `https://my-v--long-example-com.ipns.dweb.link`
2021-01-01 21:39:42 +01:00