mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
restored Node.Sanitize() for RPC endpoints
multiple other updates from code review
This commit is contained in:
@@ -155,13 +155,12 @@ func TestEventStream_PayloadValue(t *testing.T) {
|
||||
require.NotEmpty(t, n.ID)
|
||||
|
||||
// perform a raw decoding and look for:
|
||||
// - "ID", to make sure that raw decoding is correct
|
||||
// - "SecretID", to make sure it's not present
|
||||
// - "ID" to make sure that raw decoding is working correctly
|
||||
// - "SecretID" to make sure it's not present
|
||||
raw := make(map[string]map[string]interface{}, 0)
|
||||
cfg := &mapstructure.DecoderConfig{
|
||||
Result: &raw,
|
||||
}
|
||||
|
||||
dec, err := mapstructure.NewDecoder(cfg)
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, dec.Decode(e.Payload))
|
||||
|
||||
@@ -202,7 +202,9 @@ func TestNodes_NoSecretID(t *testing.T) {
|
||||
t.Fatalf("err: %s", err)
|
||||
})
|
||||
|
||||
// Query the node, ensure that .SecretID was not returned by the HTTP server
|
||||
// perform a raw http call and make sure that:
|
||||
// - "ID" to make sure that raw decoding is working correctly
|
||||
// - "SecretID" to make sure it's not present
|
||||
resp := make(map[string]interface{})
|
||||
_, err := c.query("/v1/node/"+nodeID, &resp, nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user