2016-10-19 22:06:23 +00:00
|
|
|
package fingerprint
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2022-03-15 12:42:43 +00:00
|
|
|
"github.com/hashicorp/nomad/ci"
|
2018-06-13 22:33:25 +00:00
|
|
|
"github.com/hashicorp/nomad/helper/testlog"
|
2016-10-19 22:06:23 +00:00
|
|
|
"github.com/hashicorp/nomad/nomad/structs"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestSignalFingerprint(t *testing.T) {
|
2022-03-15 12:42:43 +00:00
|
|
|
ci.Parallel(t)
|
|
|
|
|
2018-09-16 00:48:59 +00:00
|
|
|
fp := NewSignalFingerprint(testlog.HCLogger(t))
|
2016-10-19 22:06:23 +00:00
|
|
|
node := &structs.Node{
|
|
|
|
Attributes: make(map[string]string),
|
|
|
|
}
|
|
|
|
|
2018-01-24 14:09:53 +00:00
|
|
|
response := assertFingerprintOK(t, fp, node)
|
2018-01-30 17:57:37 +00:00
|
|
|
assertNodeAttributeContains(t, response.Attributes, "os.signals")
|
2016-10-19 22:06:23 +00:00
|
|
|
}
|