Update references to "os" to use "kernel.name"

This brings test code and mocks up to date with the fingerprinter. This was a slightly larger change than I anticipated, but I think it's good for two reasons:

1. More semanitcally correct. `os.name` is something like "Windows 10 Pro" or "Ubuntu", while `kernel.name` is "windows" or "linux". `os.version` and `kernel.version` match these semantics.
2. `kernel.name` is much easier to grep for than `os`, which is helpful because oracle can't help us with strings.
This commit is contained in:
Chris Bednarski
2015-08-28 01:30:47 -07:00
parent 5b8ef5062a
commit 3164401ffd
6 changed files with 18 additions and 19 deletions

View File

@@ -119,10 +119,10 @@ func TestClient_Fingerprint(t *testing.T) {
c := testClient(t, nil)
defer c.Shutdown()
// Ensure os and arch are always present
// Ensure kernel and arch are always present
node := c.Node()
if node.Attributes["os"] == "" {
t.Fatalf("missing OS")
if node.Attributes["kernel.name"] == "" {
t.Fatalf("missing kernel.name")
}
if node.Attributes["arch"] == "" {
t.Fatalf("missing arch")
@@ -133,7 +133,6 @@ func TestClient_Drivers(t *testing.T) {
c := testClient(t, nil)
defer c.Shutdown()
// Ensure os and arch are always present
node := c.Node()
if node.Attributes["driver.exec"] == "" {
t.Fatalf("missing exec driver")