14 lines
415 B
Go
14 lines
415 B
Go
package meshmoduleassignerclient
|
|
|
|
import (
|
|
"reflect"
|
|
"testing"
|
|
)
|
|
|
|
func TestMachineNamesAreTheNodesAKeyNames(t *testing.T) {
|
|
keys := map[string][]byte{"g14.node": nil, "g14.app": nil, "ace.node": nil, "placement.novox": nil, "want.x.y": nil, "bad": nil}
|
|
if got, want := MachineNames(keys), []string{"ace", "g14", "novox"}; !reflect.DeepEqual(got, want) {
|
|
t.Errorf("MachineNames = %v, want %v", got, want)
|
|
}
|
|
}
|