diff --git a/core/cmd/starknet_node_commands_test.go b/core/cmd/starknet_node_commands_test.go index 72088608c5b..95f712d29bd 100644 --- a/core/cmd/starknet_node_commands_test.go +++ b/core/cmd/starknet_node_commands_test.go @@ -33,19 +33,16 @@ func TestShell_IndexStarkNetNodes(t *testing.T) { id := "starknet chain ID" node1 := config.Node{ - Name: ptr("first"), - URL: commoncfg.MustParseURL("https://starknet1.example"), - APIKey: ptr("key"), + Name: ptr("first"), + URL: commoncfg.MustParseURL("https://starknet1.example"), } node2 := config.Node{ - Name: ptr("second"), - URL: commoncfg.MustParseURL("https://starknet2.example"), - APIKey: ptr("key"), + Name: ptr("second"), + URL: commoncfg.MustParseURL("https://starknet2.example"), } chain := config.TOMLConfig{ - ChainID: &id, - Nodes: config.Nodes{&node1, &node2}, - FeederURL: commoncfg.MustParseURL("http://feeder.url"), + ChainID: &id, + Nodes: config.Nodes{&node1, &node2}, } app := starknetStartNewApplication(t, &chain) client, r := app.NewShellAndRenderer() diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 3d3b4bcfade..72efea38f85 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -1138,12 +1138,19 @@ CertFile = '/path/to/cert.pem' t.Run(tt.name, func(t *testing.T) { s, err := tt.config.TOMLString() require.NoError(t, err) + + // parsing from TOML requires stripping new lines + if tt.name == "full" || tt.name == "multi-chain" { + s = strings.TrimRight(s, "\n") + } + assert.Equal(t, tt.exp, s, diff.Diff(tt.exp, s)) var got Config require.NoError(t, config.DecodeTOML(strings.NewReader(s), &got)) ts, err := got.TOMLString() + require.NoError(t, err) assert.Equal(t, tt.config, got, diff.Diff(s, ts)) }) @@ -1549,6 +1556,7 @@ func TestConfig_SetFrom(t *testing.T) { require.NoError(t, c.SetFrom(&f)) } ts, err := c.TOMLString() + ts = strings.TrimRight(ts, "\n") require.NoError(t, err) assert.Equal(t, tt.exp, ts) })