@@ -45,20 +45,20 @@ func TestConfigFromChainFlag(t *testing.T) {
45
45
}{
46
46
{
47
47
"Test gossamer --chain gssmr" ,
48
- []string {"chain" },
49
- []interface {}{"gssmr" },
48
+ []string {"chain" , "name" },
49
+ []interface {}{"gssmr" , dot . GssmrConfig (). Global . Name },
50
50
dot .GssmrConfig (),
51
51
},
52
52
{
53
53
"Test gossamer --chain kusama" ,
54
- []string {"chain" },
55
- []interface {}{"kusama" },
54
+ []string {"chain" , "name" },
55
+ []interface {}{"kusama" , dot . KusamaConfig (). Global . Name },
56
56
dot .KusamaConfig (),
57
57
},
58
58
{
59
59
"Test gossamer --chain polkadot" ,
60
- []string {"chain" },
61
- []interface {}{"polkadot" },
60
+ []string {"chain" , "name" },
61
+ []interface {}{"polkadot" , dot . PolkadotConfig (). Global . Name },
62
62
dot .PolkadotConfig (),
63
63
},
64
64
}
@@ -133,8 +133,8 @@ func TestGlobalConfigFromFlags(t *testing.T) {
133
133
}{
134
134
{
135
135
"Test gossamer --config" ,
136
- []string {"config" },
137
- []interface {}{testCfgFile .Name ()},
136
+ []string {"config" , "name" },
137
+ []interface {}{testCfgFile .Name (), testCfg . Global . Name },
138
138
dot.GlobalConfig {
139
139
Name : testCfg .Global .Name ,
140
140
ID : testCfg .Global .ID ,
@@ -146,8 +146,8 @@ func TestGlobalConfigFromFlags(t *testing.T) {
146
146
},
147
147
{
148
148
"Test kusama --chain" ,
149
- []string {"config" , "chain" },
150
- []interface {}{testCfgFile .Name (), "kusama" },
149
+ []string {"config" , "chain" , "name" },
150
+ []interface {}{testCfgFile .Name (), "kusama" , dot . KusamaConfig (). Global . Name },
151
151
dot.GlobalConfig {
152
152
Name : dot .KusamaConfig ().Global .Name ,
153
153
ID : "ksmcc3" ,
@@ -172,8 +172,8 @@ func TestGlobalConfigFromFlags(t *testing.T) {
172
172
},
173
173
{
174
174
"Test gossamer --basepath" ,
175
- []string {"config" , "basepath" },
176
- []interface {}{testCfgFile .Name (), "test_basepath" },
175
+ []string {"config" , "basepath" , "name" },
176
+ []interface {}{testCfgFile .Name (), "test_basepath" , testCfg . Global . Name },
177
177
dot.GlobalConfig {
178
178
Name : testCfg .Global .Name ,
179
179
ID : testCfg .Global .ID ,
@@ -185,8 +185,8 @@ func TestGlobalConfigFromFlags(t *testing.T) {
185
185
},
186
186
{
187
187
"Test gossamer --roles" ,
188
- []string {"config" , "roles" },
189
- []interface {}{testCfgFile .Name (), "1" },
188
+ []string {"config" , "roles" , "name" },
189
+ []interface {}{testCfgFile .Name (), "1" , testCfg . Global . Name },
190
190
dot.GlobalConfig {
191
191
Name : testCfg .Global .Name ,
192
192
ID : testCfg .Global .ID ,
@@ -198,8 +198,8 @@ func TestGlobalConfigFromFlags(t *testing.T) {
198
198
},
199
199
{
200
200
"Test gossamer --publish-metrics" ,
201
- []string {"config" , "publish-metrics" },
202
- []interface {}{testCfgFile .Name (), true },
201
+ []string {"config" , "publish-metrics" , "name" },
202
+ []interface {}{testCfgFile .Name (), true , testCfg . Global . Name },
203
203
dot.GlobalConfig {
204
204
Name : testCfg .Global .Name ,
205
205
ID : testCfg .Global .ID ,
@@ -211,8 +211,8 @@ func TestGlobalConfigFromFlags(t *testing.T) {
211
211
},
212
212
{
213
213
"Test gossamer --metrics-port" ,
214
- []string {"config" , "metrics-port" },
215
- []interface {}{testCfgFile .Name (), "9871" },
214
+ []string {"config" , "metrics-port" , "name" },
215
+ []interface {}{testCfgFile .Name (), "9871" , testCfg . Global . Name },
216
216
dot.GlobalConfig {
217
217
Name : testCfg .Global .Name ,
218
218
ID : testCfg .Global .ID ,
@@ -650,8 +650,8 @@ func TestUpdateConfigFromGenesisJSON(t *testing.T) {
650
650
651
651
ctx , err := newTestContext (
652
652
t .Name (),
653
- []string {"config" , "genesis" },
654
- []interface {}{testCfgFile .Name (), genFile .Name ()},
653
+ []string {"config" , "genesis" , "name" },
654
+ []interface {}{testCfgFile .Name (), genFile .Name (), testCfg . Global . Name },
655
655
)
656
656
require .Nil (t , err )
657
657
@@ -702,8 +702,8 @@ func TestUpdateConfigFromGenesisJSON_Default(t *testing.T) {
702
702
703
703
ctx , err := newTestContext (
704
704
t .Name (),
705
- []string {"config" , "genesis" },
706
- []interface {}{testCfgFile .Name (), "" },
705
+ []string {"config" , "genesis" , "name" },
706
+ []interface {}{testCfgFile .Name (), "" , testCfg . Global . Name },
707
707
)
708
708
require .Nil (t , err )
709
709
@@ -753,8 +753,8 @@ func TestUpdateConfigFromGenesisData(t *testing.T) {
753
753
754
754
ctx , err := newTestContext (
755
755
t .Name (),
756
- []string {"config" , "genesis" },
757
- []interface {}{testCfgFile .Name (), genFile .Name ()},
756
+ []string {"config" , "genesis" , "name" },
757
+ []interface {}{testCfgFile .Name (), genFile .Name (), testCfg . Global . Name },
758
758
)
759
759
require .Nil (t , err )
760
760
0 commit comments