diff --git a/build/Dockerfile b/build/Dockerfile index 8f350bf67..f9795b983 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -12,7 +12,7 @@ ARG BASE_PATH=/opt/cartesi ARG RUST_BUILD_PATH=${BASE_PATH}/src/rollups-node/offchain ARG DEPLOYMENT_PATH=${BASE_PATH}/share/deployments ARG GO_BASE_PATH=/go -ARG GO_BUILD_PATH=${GO_BASE_PATH}/rollups-node +ARG GO_BUILD_PATH=${GO_BASE_PATH}/cartesi-rollups-node ARG GO_BIN_PATH=${GO_BASE_PATH}/bin ARG RUNTIME_DIR=/var/opt/cartesi @@ -78,7 +78,7 @@ FROM golang:${GO_VERSION}-bookworm as go-builder ARG GO_BUILD_PATH WORKDIR ${GO_BUILD_PATH} COPY . . -RUN go install -ldflags "-s -w" ./cmd/cartesi-node +RUN go install -ldflags "-s -w" ./cmd/cartesi-rollups-node # # Runtime @@ -106,7 +106,7 @@ ENV PATH="${BASE_PATH}/bin:${PATH}" # Copy Go binary ARG GO_BIN_PATH -COPY --from=go-builder ${GO_BIN_PATH}/cartesi-node . +COPY --from=go-builder ${GO_BIN_PATH}/cartesi-rollups-node . # Setup runtime dir ARG RUNTIME_DIR diff --git a/cmd/cartesi-node/main.go b/cmd/cartesi-rollups-node/main.go similarity index 100% rename from cmd/cartesi-node/main.go rename to cmd/cartesi-rollups-node/main.go diff --git a/cmd/cartesi-node/no-backend.go b/cmd/cartesi-rollups-node/nobackend.go similarity index 74% rename from cmd/cartesi-node/no-backend.go rename to cmd/cartesi-rollups-node/nobackend.go index cc846832d..9684d0d14 100644 --- a/cmd/cartesi-node/no-backend.go +++ b/cmd/cartesi-rollups-node/nobackend.go @@ -6,8 +6,8 @@ package main import "github.com/spf13/cobra" var noBackend = &cobra.Command{ - Use: "no-backend", - Short: "Starts the node in no-backend mode", + Use: "nobackend", + Short: "Starts the node in nobackend mode", DisableFlagsInUseLine: true, Run: func(cmd *cobra.Command, args []string) { println("TODO") diff --git a/cmd/cartesi-node/reader.go b/cmd/cartesi-rollups-node/reader.go similarity index 100% rename from cmd/cartesi-node/reader.go rename to cmd/cartesi-rollups-node/reader.go diff --git a/cmd/cartesi-node/root.go b/cmd/cartesi-rollups-node/root.go similarity index 89% rename from cmd/cartesi-node/root.go rename to cmd/cartesi-rollups-node/root.go index 80a1c29be..e9db60aab 100644 --- a/cmd/cartesi-node/root.go +++ b/cmd/cartesi-rollups-node/root.go @@ -6,7 +6,7 @@ package main import "github.com/spf13/cobra" var rootCmd = &cobra.Command{ - Use: "cartesi-node", + Use: "cartesi-rollups-node", CompletionOptions: cobra.CompletionOptions{HiddenDefaultCmd: true}, DisableFlagsInUseLine: true, } diff --git a/cmd/cartesi-node/validator.go b/cmd/cartesi-rollups-node/validator.go similarity index 100% rename from cmd/cartesi-node/validator.go rename to cmd/cartesi-rollups-node/validator.go diff --git a/internal/pkg/services/graphql-service.go b/internal/pkg/services/graphql.go similarity index 100% rename from internal/pkg/services/graphql-service.go rename to internal/pkg/services/graphql.go diff --git a/internal/pkg/services/graphql-service_test.go b/internal/pkg/services/graphql_test.go similarity index 86% rename from internal/pkg/services/graphql-service_test.go rename to internal/pkg/services/graphql_test.go index 417f0c6f4..61c8d67c9 100644 --- a/internal/pkg/services/graphql-service_test.go +++ b/internal/pkg/services/graphql_test.go @@ -1,3 +1,6 @@ +// (c) Cartesi and individual authors (see AUTHORS) +// SPDX-License-Identifier: Apache-2.0 (see LICENSE) + package services import ( @@ -19,13 +22,12 @@ func TestGraphQLService(t *testing.T) { exit := make(chan error) go func() { - <-time.After(100 * time.Millisecond) if err := service.Start(ctx); err != nil { exit <- err } }() - <-time.After(200 * time.Millisecond) + <-time.After(100 * time.Millisecond) cancel() err := <-exit @@ -40,7 +42,6 @@ func TestGraphQLService(t *testing.T) { func setupEnvVars() { abs, _ := filepath.Abs("../../../offchain/target/debug") os.Setenv("PATH", abs) - os.Setenv("POSTGRES_PASSWORD", "pw") } func assertExitErrorWasCausedBy(err *exec.ExitError, signal syscall.Signal) bool {