mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 23:42:23 +00:00
9087854b1e
And deprecate the old way of Address/Port configuration for these services.
22 lines
663 B
Go
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))
|
|
}
|