mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user