Skip to content

Commit 6727c8d

Browse files
committed
feat: add input.DockerComposeFileURL
1 parent e3439f4 commit 6727c8d

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

book/src/framework/components/blockchains/ton.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ TON (The Open Network) support in the framework utilizes MyLocalTon Docker Compo
88
[blockchain_a]
99
type = "ton"
1010
# By default uses MyLocalTon Docker Compose file
11-
image = "https://raw.githubusercontent.com/neodix42/mylocalton-docker/main/docker-compose.yaml"
11+
docker_compose_file_url = "https://raw.githubusercontent.com/neodix42/mylocalton-docker/main/docker-compose.yaml"
1212
# Optional: Specify only core services needed for testing (useful in CI environments)
1313
ton_core_services = [
1414
"genesis",

framework/components/blockchain/blockchain.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ type Input struct {
5656
CustomPorts []string `toml:"custom_ports"`
5757

5858
// Ton - MyLocalTon essesntial services to run tests
59-
TonCoreServices []string `toml:"ton_core_services"`
59+
DockerComposeFileURL string `toml:"docker_compose_file_url"`
60+
TonCoreServices []string `toml:"ton_core_services"`
6061
}
6162

6263
// Output is a blockchain network output, ChainID and one or more nodes that forms the network

framework/components/blockchain/ton.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ const (
3030
)
3131

3232
func defaultTon(in *Input) {
33-
if in.Image == "" {
34-
// Note: mylocalton uses a compose file, not a single image. Reusing common image field
35-
in.Image = "https://raw.githubusercontent.com/neodix42/mylocalton-docker/main/docker-compose.yaml"
33+
if in.DockerComposeFileURL == "" {
34+
in.DockerComposeFileURL = "https://raw.githubusercontent.com/neodix42/mylocalton-docker/main/docker-compose.yaml"
3635
}
3736
// Note: in local env having all services could be useful(explorer, faucet), in CI we need only core services
3837
if os.Getenv("CI") == "true" && len(in.TonCoreServices) == 0 {
@@ -48,7 +47,7 @@ func newTon(in *Input) (*Output, error) {
4847
defaultTon(in)
4948
containerName := framework.DefaultTCName("blockchain-node")
5049

51-
resp, err := http.Get(in.Image)
50+
resp, err := http.Get(in.DockerComposeFileURL)
5251
if err != nil {
5352
return nil, fmt.Errorf("failed to download docker-compose file: %v", err)
5453
}

framework/examples/myproject/smoke_ton.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[blockchain_a]
22
type = "ton"
3-
image = "https://raw.githubusercontent.com/neodix42/mylocalton-docker/main/docker-compose.yaml"
3+
docker_compose_file_url = "https://raw.githubusercontent.com/neodix42/mylocalton-docker/main/docker-compose.yaml"
44
ton_core_services = [
55
"genesis",
66
"tonhttpapi",

0 commit comments

Comments
 (0)