Skip to content

Commit

Permalink
backport of commit 9d4f7bc (#20404)
Browse files Browse the repository at this point in the history
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
  • Loading branch information
hc-github-team-nomad-core and lgfa29 authored Apr 16, 2024
1 parent 9b6a03b commit 1e221d6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 25 deletions.
4 changes: 0 additions & 4 deletions client/driver_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,6 @@ func TestDriverManager_NodeAttributes_Run(t *testing.T) {
return false, fmt.Errorf("mock_driver driver is not marked as healthy: %+v", d)
}

if d.Attributes["driver.mock_driver"] != "" {
return false, fmt.Errorf("mock driver driver attributes contain duplicate health info: %#v", d.Attributes)
}

// check raw_exec
if node.Attributes["driver.raw_exec"] == "" {
return false, fmt.Errorf("raw_exec is not present in attributes: %#v", node.Attributes)
Expand Down
2 changes: 1 addition & 1 deletion drivers/mock/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ func (d *Driver) buildFingerprint() *drivers.Fingerprint {
desc = "disabled"
} else {
health = drivers.HealthStateHealthy
attrs["driver.mock"] = pstructs.NewBoolAttribute(true)
attrs["driver.mock_driver"] = pstructs.NewBoolAttribute(true)
desc = drivers.DriverHealthy
}

Expand Down
10 changes: 0 additions & 10 deletions website/content/api-docs/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ http://127.0.0.1:4646/v1/event/stream
"driver.docker.os_type": "linux",
"driver.docker.runtimes": "runc",
"driver.docker.version": "19.03.13",
"driver.mock": "true",
"driver.mock_driver": "1",
"driver.raw_exec": "1",
"kernel.name": "linux",
Expand Down Expand Up @@ -362,15 +361,6 @@ http://127.0.0.1:4646/v1/event/stream
"HealthDescription": "Driver must run as root",
"UpdateTime": "2020-10-15T10:07:37.445601605-04:00"
},
"mock_driver": {
"Attributes": {
"driver.mock": "true"
},
"Detected": true,
"Healthy": true,
"HealthDescription": "Healthy",
"UpdateTime": "2020-10-15T10:07:37.445193068-04:00"
},
"qemu": {
"Attributes": null,
"Detected": false,
Expand Down
10 changes: 0 additions & 10 deletions website/content/api-docs/nodes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ $ curl \
"driver.docker.runtimes": "runc",
"driver.docker.version": "18.09.6",
"driver.docker.volumes.enabled": "true",
"driver.mock": "true",
"driver.mock_driver": "1",
"driver.raw_exec": "1",
"kernel.name": "linux",
Expand Down Expand Up @@ -257,15 +256,6 @@ $ curl \
"Healthy": false,
"UpdateTime": "2019-08-26T12:22:50.687274359+02:00"
},
"mock_driver": {
"Attributes": {
"driver.mock": "true"
},
"Detected": true,
"HealthDescription": "Healthy",
"Healthy": true,
"UpdateTime": "2019-08-26T12:22:50.687978919+02:00"
},
"qemu": {
"Attributes": null,
"Detected": false,
Expand Down

0 comments on commit 1e221d6

Please sign in to comment.