Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions framework/.changeset/v0.15.16.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix Sui/Aptos CTF providers tarring the process working directory when `ContractsDir` is empty, eliminating an `archive/tar: write too long` flake in downstream CCIP smoke tests
22 changes: 13 additions & 9 deletions framework/components/blockchain/aptos.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,18 @@ func newAptos(ctx context.Context, in *Input) (*Output, error) {
defaultAptos(in)
containerName := framework.DefaultTCName("blockchain-node")

absPath, err := filepath.Abs(in.ContractsDir)
if err != nil {
return nil, err
var files []testcontainers.ContainerFile
if in.ContractsDir != "" {
absPath, err := filepath.Abs(in.ContractsDir)
if err != nil {
return nil, err
}
files = []testcontainers.ContainerFile{
{
HostFilePath: absPath,
ContainerFilePath: "/",
},
}
}

exposedPorts, bindings, err := framework.GenerateCustomPortsData(in.CustomPorts)
Expand Down Expand Up @@ -108,12 +117,7 @@ func newAptos(ctx context.Context, in *Input) (*Output, error) {
},
ImagePlatform: imagePlatform,
Cmd: cmd,
Files: []testcontainers.ContainerFile{
{
HostFilePath: absPath,
ContainerFilePath: "/",
},
},
Files: files,
}

c, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
Expand Down
22 changes: 13 additions & 9 deletions framework/components/blockchain/sui.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,18 @@ func newSui(ctx context.Context, in *Input) (*Output, error) {
defaultSui(in)
containerName := framework.DefaultTCName("blockchain-node")

absPath, err := filepath.Abs(in.ContractsDir)
if err != nil {
return nil, err
var files []testcontainers.ContainerFile
if in.ContractsDir != "" {
absPath, err := filepath.Abs(in.ContractsDir)
if err != nil {
return nil, err
}
files = []testcontainers.ContainerFile{
{
HostFilePath: absPath,
ContainerFilePath: "/",
},
}
}

// Sui container always listens on port 9000 internally
Expand Down Expand Up @@ -150,12 +159,7 @@ func newSui(ctx context.Context, in *Input) (*Output, error) {
"--force-regenesis",
"--with-faucet",
},
Files: []testcontainers.ContainerFile{
{
HostFilePath: absPath,
ContainerFilePath: "/",
},
},
Files: files,
// we need faucet for funding
WaitingFor: wait.ForListeningPort(DefaultFaucetPort).WithStartupTimeout(1 * time.Minute).WithPollInterval(200 * time.Millisecond),
}
Expand Down
Loading