Skip to content

Commit 67c89bb

Browse files
lidelgammazero
andauthored
feat(config): add Import.* for CID Profiles from IPIP-499 (#11148)
* feat(config): Import.* and unixfs-v1-2025 profile implements IPIP-499: add config options for controlling UnixFS DAG determinism and introduces `unixfs-v1-2025` and `unixfs-v0-2015` profiles for cross-implementation CID reproducibility. changes: - add Import.* fields: HAMTDirectorySizeEstimation, SymlinkMode, DAGLayout, IncludeEmptyDirectories, IncludeHidden - add validation for all Import.* config values - add unixfs-v1-2025 profile (recommended for new data) - add unixfs-v0-2015 profile (alias: legacy-cid-v0) - remove deprecated test-cid-v1 and test-cid-v1-wide profiles - wire Import.HAMTSizeEstimationMode() to boxo globals - update go.mod to use boxo with SizeEstimationMode support ref: https://specs.ipfs.tech/ipips/ipip-0499/ * feat(add): add --dereference-symlinks, --empty-dirs, --hidden CLI flags add CLI flags for controlling file collection behavior during ipfs add: - `--dereference-symlinks`: recursively resolve symlinks to their target content (replaces deprecated --dereference-args which only worked on CLI arguments). wired through go-ipfs-cmds to boxo's SerialFileOptions. - `--empty-dirs` / `-E`: include empty directories (default: true) - `--hidden` / `-H`: include hidden files (default: false) these flags are CLI-only and not wired to Import.* config options because go-ipfs-cmds library handles input file filtering before the directory tree is passed to kubo. removed unused Import.UnixFSSymlinkMode config option that was defined but never actually read by the CLI. also: - wire --trickle to Import.UnixFSDAGLayout config default - update go-ipfs-cmds to v0.15.1-0.20260117043932-17687e216294 - add SYMLINK HANDLING section to ipfs add help text - add CLI tests for all three flags ref: ipfs/specs#499 * test(add): add CID profile tests and wire SizeEstimationMode add comprehensive test suite for UnixFS CID determinism per IPIP-499: - verify exact HAMT threshold boundary for both estimation modes: - v0-2015 (links): sum(name_len + cid_len) == 262144 - v1-2025 (block): serialized block size == 262144 - verify HAMT triggers at threshold + 1 byte for both profiles - add all deterministic CIDs for cross-implementation testing also wires SizeEstimationMode through CLI/API, allowing Import.UnixFSHAMTSizeEstimation config to take effect. bumps boxo to ipfs/boxo@6707376 which aligns HAMT threshold with JS implementation (uses > instead of >=), fixing CID determinism at the exact 256 KiB boundary. * feat(add): --dereference-symlinks now resolves all symlinks Previously, resolving symlinks required two flags: - --dereference-args: resolved symlinks passed as CLI arguments - --dereference-symlinks: resolved symlinks inside directories Now --dereference-symlinks handles both cases. Users only need one flag to fully dereference symlinks when adding files to IPFS. The deprecated --dereference-args still works for backwards compatibility but is no longer necessary. * chore: update boxo and improve changelog - update boxo to ebdaf07c (nil filter fix, thread-safety docs) - simplify changelog for IPIP-499 section - shorten test names, move context to comments * chore: update boxo to 5cf22196 * chore: apply suggestions from code review Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com> * test(add): verify balanced DAG layout produces uniform leaf depth add test that confirms kubo uses balanced layout (all leaves at same depth) rather than balanced-packed (varying depths). creates 45MiB file to trigger multi-level DAG and walks it to verify leaf depth uniformity. includes trickle subtest to validate test logic can detect varying depths. supports CAR export via DAG_LAYOUT_CAR_OUTPUT env var for test vectors. * chore(deps): update boxo to 6141039ad8ef switches to ipfs/boxo@6141039 changes since 5cf22196ad0b: - refactor(unixfs): use arithmetic for exact block size calculation - refactor(unixfs): unify size tracking and make SizeEstimationMode immutable - feat(unixfs): optimize SizeEstimationBlock and add mode/mtime tests also clarifies that directory sharding globals affect both `ipfs add` and MFS. * test(cli): improve HAMT threshold tests with exact +1 byte verification - add UnixFSDataType() helper to directly check UnixFS type via protobuf - refactor threshold tests to use exact +1 byte calculations instead of +1 file - verify directory type directly (ft.TDirectory vs ft.THAMTShard) instead of inferring from link count - clean up helper function signatures by removing unused cidLength parameter * test(cli): consolidate profile tests into cid_profiles_test.go remove duplicate profile threshold tests from add_test.go since they are fully covered by the data-driven tests in cid_profiles_test.go. changes: - improve test names to describe what threshold is being tested - add inline documentation explaining each test's purpose - add byte-precise helper IPFSAddDeterministicBytes for threshold tests - remove ~200 lines of duplicated test code from add_test.go - keep non-profile tests (pinning, symlinks, hidden files) in add_test.go * chore: update to rebased boxo and go-ipfs-cmds PRs * docs: add HAMT threshold fix details to changelog * feat(mfs): use Import config for CID version and hash function make MFS commands (files cp, files write, files mkdir, files chcid) respect Import.CidVersion and Import.HashFunction config settings when CLI options are not explicitly provided. also add tests for: - files write respects Import.UnixFSRawLeaves=true - single-block file: files write produces same CID as ipfs add - updated comments clarifying CID parity with ipfs add * feat(files): wire Import.UnixFSChunker and UnixFSDirectoryMaxLinks to MFS `ipfs files` commands now respect these Import.* config options: - UnixFSChunker: configures chunk size for `files write` - UnixFSDirectoryMaxLinks: triggers HAMT sharding in `files mkdir` - UnixFSHAMTDirectorySizeEstimation: controls size estimation mode previously, MFS used hardcoded defaults ignoring user config. changes: - config/import.go: add UnixFSSplitterFunc() returning chunk.SplitterGen - core/node/core.go: pass chunker, maxLinks, sizeEstimationMode to mfs.NewRoot() via new boxo RootOption API - core/commands/files.go: pass maxLinks and sizeEstimationMode to mfs.Mkdir() and ensureContainingDirectoryExists(); document that UnixFSFileMaxLinks doesn't apply to files write (trickle DAG limitation) - test/cli/files_test.go: add tests for UnixFSDirectoryMaxLinks and UnixFSChunker, including CID parity test with `ipfs add --trickle` related: boxo@54e044f1b265 * feat(files): wire Import.UnixFSHAMTDirectoryMaxFanout and UnixFSHAMTDirectorySizeThreshold wire remaining HAMT config options to MFS root: - Import.UnixFSHAMTDirectoryMaxFanout via mfs.WithMaxHAMTFanout - Import.UnixFSHAMTDirectorySizeThreshold via mfs.WithHAMTShardingSize add CLI tests: - files mkdir respects Import.UnixFSHAMTDirectoryMaxFanout - files mkdir respects Import.UnixFSHAMTDirectorySizeThreshold - config change takes effect after daemon restart add UnixFSHAMTFanout() helper to test harness update boxo to ac97424d99ab90e097fc7c36f285988b596b6f05 * fix(mfs): single-block files in CIDv1 dirs now produce raw CIDs problem: `ipfs files write` in CIDv1 directories wrapped single-block files in dag-pb even when raw-leaves was enabled, producing different CIDs than `ipfs add --raw-leaves` for the same content. fix: boxo now collapses single-block ProtoNode wrappers (with no metadata) to RawNode in DagModifier.GetNode(). files with mtime/mode stay as dag-pb since raw blocks cannot store UnixFS metadata. also fixes sparse file writes where writing past EOF would lose data because expandSparse didn't update the internal node pointer. updates boxo to v0.36.1-0.20260203003133-7884ae23aaff updates t0250-files-api.sh test hashes to match new behavior * chore(test): use Go 1.22+ range-over-int syntax * chore: update boxo to c6829fe26860 - fix typo in files write help text - update boxo with CI fixes (gofumpt, race condition in test) * chore: update go-ipfs-cmds to 192ec9d15c1f includes binary content types fix: gzip, zip, vnd.ipld.car, vnd.ipld.raw, vnd.ipfs.ipns-record * chore: update boxo to 0a22cde9225c includes refactor of maxLinks check in addLinkChild (review feedback). * ci: fix helia-interop and improve caching skip '@helia/mfs - should have the same CID after creating a file' test until helia implements IPIP-499 (tracking: ipfs/helia#941) the test fails because kubo now collapses single-block files to raw CIDs while helia explicitly uses reduceSingleLeafToSelf: false changes: - run aegir directly instead of helia-interop binary (binary ignores --grep flags) - cache node_modules keyed by @helia/interop version from npm registry - skip npm install on cache hit (matches ipfs-webui caching pattern) * chore: update boxo to 1e30b954 includes latest upstream changes from boxo main * chore: update go-ipfs-cmds to 1b2a641ed6f6 * chore: update boxo to f188f79fd412 switches to boxo@main after merging ipfs/boxo#1088 * chore: update go-ipfs-cmds to af9bcbaf5709 switches to go-ipfs-cmds@master after merging ipfs/go-ipfs-cmds#315 --------- Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com>
1 parent ff4bb10 commit 67c89bb

28 files changed

Lines changed: 2311 additions & 447 deletions

File tree

.github/workflows/interop.yml

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,42 @@ jobs:
7171
name: kubo
7272
path: cmd/ipfs
7373
- run: chmod +x cmd/ipfs/ipfs
74-
- run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
75-
id: npm-cache-dir
76-
- uses: actions/cache@v5
77-
with:
78-
path: ${{ steps.npm-cache-dir.outputs.dir }}
79-
key: ${{ runner.os }}-${{ github.job }}-helia-${{ hashFiles('**/package-lock.json') }}
80-
restore-keys: ${{ runner.os }}-${{ github.job }}-helia-
8174
- run: sudo apt update
8275
- run: sudo apt install -y libxkbcommon0 libxdamage1 libgbm1 libpango-1.0-0 libcairo2 # dependencies for playwright
83-
- run: npx --package @helia/interop helia-interop
76+
# Cache node_modules based on latest @helia/interop version from npm registry.
77+
# This ensures we always test against the latest release while still benefiting
78+
# from caching when the version hasn't changed.
79+
- name: Get latest @helia/interop version
80+
id: helia-version
81+
run: echo "version=$(npm view @helia/interop version)" >> $GITHUB_OUTPUT
82+
- name: Cache helia-interop node_modules
83+
uses: actions/cache@v5
84+
id: helia-cache
85+
with:
86+
path: node_modules
87+
key: ${{ runner.os }}-helia-interop-${{ steps.helia-version.outputs.version }}
88+
- name: Install @helia/interop
89+
if: steps.helia-cache.outputs.cache-hit != 'true'
90+
run: npm install @helia/interop
91+
# TODO(IPIP-499): Remove --grep --invert workaround once helia implements IPIP-499
92+
# Tracking issue: https://github.com/ipfs/helia/issues/941
93+
#
94+
# PROVISIONAL HACK: Skip '@helia/mfs - should have the same CID after
95+
# creating a file' test due to IPIP-499 changes in kubo.
96+
#
97+
# WHY IT FAILS: The test creates a 5-byte file in MFS on both kubo and helia,
98+
# then compares the root directory CID. With kubo PR #11148, `ipfs files write`
99+
# now produces raw CIDs for single-block files (matching `ipfs add --raw-leaves`),
100+
# while helia uses `reduceSingleLeafToSelf: false` which keeps the dag-pb wrapper.
101+
# Different file CIDs lead to different directory CIDs.
102+
#
103+
# We run aegir directly (instead of helia-interop binary) because only aegir
104+
# supports the --grep/--invert flags needed to exclude specific tests.
105+
- name: Run helia-interop tests (excluding IPIP-499 incompatible test)
106+
run: npx aegir test -t node --bail -- --grep 'should have the same CID after creating a file' --invert
84107
env:
85108
KUBO_BINARY: ${{ github.workspace }}/cmd/ipfs/ipfs
109+
working-directory: node_modules/@helia/interop
86110
ipfs-webui:
87111
needs: [interop-prep]
88112
runs-on: ${{ fromJSON(github.repository == 'ipfs/kubo' && '["self-hosted", "linux", "x64", "2xlarge"]' || '"ubuntu-latest"') }}

config/import.go

Lines changed: 95 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ package config
22

33
import (
44
"fmt"
5+
"io"
56
"strconv"
67
"strings"
78

9+
chunk "github.com/ipfs/boxo/chunker"
810
"github.com/ipfs/boxo/ipld/unixfs/importer/helpers"
9-
"github.com/ipfs/boxo/ipld/unixfs/io"
11+
uio "github.com/ipfs/boxo/ipld/unixfs/io"
1012
"github.com/ipfs/boxo/verifcid"
1113
mh "github.com/multiformats/go-multihash"
1214
)
@@ -29,29 +31,44 @@ const (
2931
// write-batch. The total size of the batch is limited by
3032
// BatchMaxnodes and BatchMaxSize.
3133
DefaultBatchMaxSize = 100 << 20 // 20MiB
34+
35+
// HAMTSizeEstimation values for Import.UnixFSHAMTDirectorySizeEstimation
36+
HAMTSizeEstimationLinks = "links" // legacy: estimate using link names + CID byte lengths (default)
37+
HAMTSizeEstimationBlock = "block" // full serialized dag-pb block size
38+
HAMTSizeEstimationDisabled = "disabled" // disable HAMT sharding entirely
39+
40+
// DAGLayout values for Import.UnixFSDAGLayout
41+
DAGLayoutBalanced = "balanced" // balanced DAG layout (default)
42+
DAGLayoutTrickle = "trickle" // trickle DAG layout
43+
44+
DefaultUnixFSHAMTDirectorySizeEstimation = HAMTSizeEstimationLinks // legacy behavior
45+
DefaultUnixFSDAGLayout = DAGLayoutBalanced // balanced DAG layout
46+
DefaultUnixFSIncludeEmptyDirs = true // include empty directories
3247
)
3348

3449
var (
3550
DefaultUnixFSFileMaxLinks = int64(helpers.DefaultLinksPerBlock)
3651
DefaultUnixFSDirectoryMaxLinks = int64(0)
37-
DefaultUnixFSHAMTDirectoryMaxFanout = int64(io.DefaultShardWidth)
52+
DefaultUnixFSHAMTDirectoryMaxFanout = int64(uio.DefaultShardWidth)
3853
)
3954

4055
// Import configures the default options for ingesting data. This affects commands
4156
// that ingest data, such as 'ipfs add', 'ipfs dag put, 'ipfs block put', 'ipfs files write'.
4257
type Import struct {
43-
CidVersion OptionalInteger
44-
UnixFSRawLeaves Flag
45-
UnixFSChunker OptionalString
46-
HashFunction OptionalString
47-
UnixFSFileMaxLinks OptionalInteger
48-
UnixFSDirectoryMaxLinks OptionalInteger
49-
UnixFSHAMTDirectoryMaxFanout OptionalInteger
50-
UnixFSHAMTDirectorySizeThreshold OptionalBytes
51-
BatchMaxNodes OptionalInteger
52-
BatchMaxSize OptionalInteger
53-
FastProvideRoot Flag
54-
FastProvideWait Flag
58+
CidVersion OptionalInteger
59+
UnixFSRawLeaves Flag
60+
UnixFSChunker OptionalString
61+
HashFunction OptionalString
62+
UnixFSFileMaxLinks OptionalInteger
63+
UnixFSDirectoryMaxLinks OptionalInteger
64+
UnixFSHAMTDirectoryMaxFanout OptionalInteger
65+
UnixFSHAMTDirectorySizeThreshold OptionalBytes
66+
UnixFSHAMTDirectorySizeEstimation OptionalString // "links", "block", or "disabled"
67+
UnixFSDAGLayout OptionalString // "balanced" or "trickle"
68+
BatchMaxNodes OptionalInteger
69+
BatchMaxSize OptionalInteger
70+
FastProvideRoot Flag
71+
FastProvideWait Flag
5572
}
5673

5774
// ValidateImportConfig validates the Import configuration according to UnixFS spec requirements.
@@ -129,6 +146,30 @@ func ValidateImportConfig(cfg *Import) error {
129146
}
130147
}
131148

149+
// Validate UnixFSHAMTDirectorySizeEstimation
150+
if !cfg.UnixFSHAMTDirectorySizeEstimation.IsDefault() {
151+
est := cfg.UnixFSHAMTDirectorySizeEstimation.WithDefault(DefaultUnixFSHAMTDirectorySizeEstimation)
152+
switch est {
153+
case HAMTSizeEstimationLinks, HAMTSizeEstimationBlock, HAMTSizeEstimationDisabled:
154+
// valid
155+
default:
156+
return fmt.Errorf("Import.UnixFSHAMTDirectorySizeEstimation must be %q, %q, or %q, got %q",
157+
HAMTSizeEstimationLinks, HAMTSizeEstimationBlock, HAMTSizeEstimationDisabled, est)
158+
}
159+
}
160+
161+
// Validate UnixFSDAGLayout
162+
if !cfg.UnixFSDAGLayout.IsDefault() {
163+
layout := cfg.UnixFSDAGLayout.WithDefault(DefaultUnixFSDAGLayout)
164+
switch layout {
165+
case DAGLayoutBalanced, DAGLayoutTrickle:
166+
// valid
167+
default:
168+
return fmt.Errorf("Import.UnixFSDAGLayout must be %q or %q, got %q",
169+
DAGLayoutBalanced, DAGLayoutTrickle, layout)
170+
}
171+
}
172+
132173
return nil
133174
}
134175

@@ -144,8 +185,7 @@ func isValidChunker(chunker string) bool {
144185
}
145186

146187
// Check for size-<bytes> format
147-
if strings.HasPrefix(chunker, "size-") {
148-
sizeStr := strings.TrimPrefix(chunker, "size-")
188+
if sizeStr, ok := strings.CutPrefix(chunker, "size-"); ok {
149189
if sizeStr == "" {
150190
return false
151191
}
@@ -167,7 +207,7 @@ func isValidChunker(chunker string) bool {
167207

168208
// Parse and validate min, avg, max values
169209
values := make([]int, 3)
170-
for i := 0; i < 3; i++ {
210+
for i := range 3 {
171211
val, err := strconv.Atoi(parts[i+1])
172212
if err != nil {
173213
return false
@@ -182,3 +222,41 @@ func isValidChunker(chunker string) bool {
182222

183223
return false
184224
}
225+
226+
// HAMTSizeEstimationMode returns the boxo SizeEstimationMode based on the config value.
227+
func (i *Import) HAMTSizeEstimationMode() uio.SizeEstimationMode {
228+
switch i.UnixFSHAMTDirectorySizeEstimation.WithDefault(DefaultUnixFSHAMTDirectorySizeEstimation) {
229+
case HAMTSizeEstimationLinks:
230+
return uio.SizeEstimationLinks
231+
case HAMTSizeEstimationBlock:
232+
return uio.SizeEstimationBlock
233+
case HAMTSizeEstimationDisabled:
234+
return uio.SizeEstimationDisabled
235+
default:
236+
return uio.SizeEstimationLinks
237+
}
238+
}
239+
240+
// UnixFSSplitterFunc returns a SplitterGen function based on Import.UnixFSChunker.
241+
// The returned function creates a Splitter for the configured chunking strategy.
242+
// The chunker string is parsed once when this method is called, not on each use.
243+
func (i *Import) UnixFSSplitterFunc() chunk.SplitterGen {
244+
chunkerStr := i.UnixFSChunker.WithDefault(DefaultUnixFSChunker)
245+
246+
// Parse size-based chunker (most common case) and return optimized generator
247+
if sizeStr, ok := strings.CutPrefix(chunkerStr, "size-"); ok {
248+
if size, err := strconv.ParseInt(sizeStr, 10, 64); err == nil && size > 0 {
249+
return chunk.SizeSplitterGen(size)
250+
}
251+
}
252+
253+
// For other chunker types (rabin, buzhash) or invalid config,
254+
// fall back to parsing per-use (these are rare cases)
255+
return func(r io.Reader) chunk.Splitter {
256+
s, err := chunk.FromString(r, chunkerStr)
257+
if err != nil {
258+
return chunk.DefaultSplitter(r)
259+
}
260+
return s
261+
}
262+
}

config/import_test.go

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"strings"
55
"testing"
66

7+
"github.com/ipfs/boxo/ipld/unixfs/io"
78
mh "github.com/multiformats/go-multihash"
89
)
910

@@ -406,3 +407,104 @@ func TestIsPowerOfTwo(t *testing.T) {
406407
})
407408
}
408409
}
410+
411+
func TestValidateImportConfig_HAMTSizeEstimation(t *testing.T) {
412+
tests := []struct {
413+
name string
414+
value string
415+
wantErr bool
416+
errMsg string
417+
}{
418+
{name: "valid links", value: HAMTSizeEstimationLinks, wantErr: false},
419+
{name: "valid block", value: HAMTSizeEstimationBlock, wantErr: false},
420+
{name: "valid disabled", value: HAMTSizeEstimationDisabled, wantErr: false},
421+
{name: "invalid unknown", value: "unknown", wantErr: true, errMsg: "must be"},
422+
{name: "invalid empty", value: "", wantErr: true, errMsg: "must be"},
423+
{name: "invalid typo", value: "link", wantErr: true, errMsg: "must be"},
424+
}
425+
426+
for _, tt := range tests {
427+
t.Run(tt.name, func(t *testing.T) {
428+
cfg := &Import{
429+
UnixFSHAMTDirectorySizeEstimation: *NewOptionalString(tt.value),
430+
}
431+
432+
err := ValidateImportConfig(cfg)
433+
434+
if tt.wantErr {
435+
if err == nil {
436+
t.Errorf("expected error for value=%q, got nil", tt.value)
437+
} else if tt.errMsg != "" && !strings.Contains(err.Error(), tt.errMsg) {
438+
t.Errorf("error = %v, want error containing %q", err, tt.errMsg)
439+
}
440+
} else {
441+
if err != nil {
442+
t.Errorf("unexpected error for value=%q: %v", tt.value, err)
443+
}
444+
}
445+
})
446+
}
447+
}
448+
449+
func TestValidateImportConfig_DAGLayout(t *testing.T) {
450+
tests := []struct {
451+
name string
452+
value string
453+
wantErr bool
454+
errMsg string
455+
}{
456+
{name: "valid balanced", value: DAGLayoutBalanced, wantErr: false},
457+
{name: "valid trickle", value: DAGLayoutTrickle, wantErr: false},
458+
{name: "invalid unknown", value: "unknown", wantErr: true, errMsg: "must be"},
459+
{name: "invalid empty", value: "", wantErr: true, errMsg: "must be"},
460+
{name: "invalid flat", value: "flat", wantErr: true, errMsg: "must be"},
461+
}
462+
463+
for _, tt := range tests {
464+
t.Run(tt.name, func(t *testing.T) {
465+
cfg := &Import{
466+
UnixFSDAGLayout: *NewOptionalString(tt.value),
467+
}
468+
469+
err := ValidateImportConfig(cfg)
470+
471+
if tt.wantErr {
472+
if err == nil {
473+
t.Errorf("expected error for value=%q, got nil", tt.value)
474+
} else if tt.errMsg != "" && !strings.Contains(err.Error(), tt.errMsg) {
475+
t.Errorf("error = %v, want error containing %q", err, tt.errMsg)
476+
}
477+
} else {
478+
if err != nil {
479+
t.Errorf("unexpected error for value=%q: %v", tt.value, err)
480+
}
481+
}
482+
})
483+
}
484+
}
485+
486+
func TestImport_HAMTSizeEstimationMode(t *testing.T) {
487+
tests := []struct {
488+
cfg string
489+
want io.SizeEstimationMode
490+
}{
491+
{HAMTSizeEstimationLinks, io.SizeEstimationLinks},
492+
{HAMTSizeEstimationBlock, io.SizeEstimationBlock},
493+
{HAMTSizeEstimationDisabled, io.SizeEstimationDisabled},
494+
{"", io.SizeEstimationLinks}, // default (unset returns default)
495+
{"unknown", io.SizeEstimationLinks}, // fallback to default
496+
}
497+
498+
for _, tt := range tests {
499+
t.Run(tt.cfg, func(t *testing.T) {
500+
var imp Import
501+
if tt.cfg != "" {
502+
imp.UnixFSHAMTDirectorySizeEstimation = *NewOptionalString(tt.cfg)
503+
}
504+
got := imp.HAMTSizeEstimationMode()
505+
if got != tt.want {
506+
t.Errorf("Import.HAMTSizeEstimationMode() with %q = %v, want %v", tt.cfg, got, tt.want)
507+
}
508+
})
509+
}
510+
}

0 commit comments

Comments
 (0)