Skip to content

Commit

Permalink
Merge pull request #665 from iotexproject/remove-code
Browse files Browse the repository at this point in the history
del unuse code
  • Loading branch information
huangzhiran authored Sep 29, 2024
2 parents 6dc357b + 16b42fd commit 854d631
Show file tree
Hide file tree
Showing 28 changed files with 8 additions and 3,809 deletions.
57 changes: 0 additions & 57 deletions apitypes/apitypes.go

This file was deleted.

14 changes: 0 additions & 14 deletions apitypes/apitypes_test.go

This file was deleted.

29 changes: 0 additions & 29 deletions cmd/prover/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package config

import (
"os"
"strings"
"testing"

. "github.com/agiledragon/gomonkey/v2"
Expand Down Expand Up @@ -59,31 +58,3 @@ func TestConfig_Init(t *testing.T) {
r.ErrorContains(err, t.Name())
})
}

func TestGet(t *testing.T) {
r := require.New(t)

t.Run("GetDefaultTestConfig", func(t *testing.T) {
_ = os.Setenv("PROVER_ENV", "INTEGRATION_TEST")

conf, err := Get()
r.NoError(err)
r.True(strings.Contains(conf.VMEndpoints, "localhost:14001"))
})

t.Run("GetDefaultDebugConfig", func(t *testing.T) {
_ = os.Setenv("PROVER_ENV", "LOCAL_DEBUG")

conf, err := Get()
r.NoError(err)
r.True(strings.Contains(conf.VMEndpoints, "localhost:4001"))
})

t.Run("GetDefaultConfig", func(t *testing.T) {
_ = os.Setenv("PROVER_ENV", "PROD")

conf, err := Get()
r.NoError(err)
r.True(strings.Contains(conf.VMEndpoints, "risc0:4001"))
})
}
28 changes: 0 additions & 28 deletions cmd/sequencer/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,3 @@ func TestConfig_Init(t *testing.T) {
r.ErrorContains(err, t.Name())
})
}

func TestGet(t *testing.T) {
r := require.New(t)

t.Run("GetDefaultTestConfig", func(t *testing.T) {
_ = os.Setenv("COORDINATOR_ENV", "INTEGRATION_TEST")

conf, err := Get()
r.NoError(err)
r.Equal(":19001", conf.ServiceEndpoint)
})

t.Run("GetDefaultDebugConfig", func(t *testing.T) {
_ = os.Setenv("COORDINATOR_ENV", "LOCAL_DEBUG")

conf, err := Get()
r.NoError(err)
r.Equal(":9001", conf.ServiceEndpoint)
})

t.Run("GetDefaultConfig", func(t *testing.T) {
_ = os.Setenv("COORDINATOR_ENV", "PROD")

conf, err := Get()
r.NoError(err)
r.Equal(":9001", conf.ServiceEndpoint)
})
}
Loading

0 comments on commit 854d631

Please sign in to comment.