neo-go/pkg/config/application_config_test.go
Anna Shaleva 9087854b1e services: allow multiple listen addresses for simple services
And deprecate the old way of Address/Port configuration for these services.
2022-12-07 11:23:01 +03:00

22 lines
663 B
Go

package config
import (
"path/filepath"
"testing"
"github.com/stretchr/testify/require"
)
func TestApplicationConfigurationEquals(t *testing.T) {
a := &ApplicationConfiguration{}
o := &ApplicationConfiguration{}
require.True(t, a.EqualsButServices(o))
require.True(t, o.EqualsButServices(a))
require.True(t, a.EqualsButServices(a))
cfg1, err := LoadFile(filepath.Join("..", "..", "config", "protocol.mainnet.yml"))
require.NoError(t, err)
cfg2, err := LoadFile(filepath.Join("..", "..", "config", "protocol.testnet.yml"))
require.NoError(t, err)
require.False(t, cfg1.ApplicationConfiguration.EqualsButServices(&cfg2.ApplicationConfiguration))
}