Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restyle Hotfix/azure only reboot nvidia #138

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions iterative/resource_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ import (

func TestScript(t *testing.T) {
t.Run("AWS known region should not add the NVIDA drivers", func(t *testing.T) {
script, err := renderScript(generateTemplateTestData("aws", "us-east-1", ""))
script, err := renderScript(generateTemplateTestData("aws", "us-east-1", ""))
assert.Nil(t, err)
assert.NotContains(t, script, "sudo ubuntu-drivers autoinstall")
})

t.Run("AWS unknown region should add the NVIDA drivers", func(t *testing.T) {
script, err := renderScript(generateTemplateTestData("aws", "us-east-99", ""))
script, err := renderScript(generateTemplateTestData("aws", "us-east-99", ""))
assert.Nil(t, err)
assert.Contains(t, script, "sudo ubuntu-drivers autoinstall")
})

t.Run("Azure known region should add the NVIDA drivers", func(t *testing.T) {
script, err := renderScript(generateTemplateTestData("azure", "westus", ""))
script, err := renderScript(generateTemplateTestData("azure", "westus", ""))
assert.Nil(t, err)
assert.Contains(t, script, "sudo ubuntu-drivers autoinstall")
})

t.Run("Azure unknown region should add the NVIDA drivers", func(t *testing.T) {
script, err := renderScript(generateTemplateTestData("azure", "us-east-99", ""))
script, err := renderScript(generateTemplateTestData("azure", "us-east-99", ""))
assert.Nil(t, err)
assert.Contains(t, script, "sudo ubuntu-drivers autoinstall")
})
Expand Down Expand Up @@ -97,10 +97,10 @@ func generateTemplateTestData(cloud string, region string, script string) map[st
"labels": "16 value with \"quotes\" and spaces",
"instance_gpu": "17 value with \"quotes\" and spaces",
"runner_startup_script": script,
"ami": isAMIAvailable(cloud, region),
"ami": isAMIAvailable(cloud, region),
}
for key, value := range generateEnvironmentTestData() {
testData[key] = value
testData[key] = value
}
return testData
}
Expand Down
1 change: 0 additions & 1 deletion iterative/testdata/script_template_cloud_azure.golden
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,3 @@ EOF'

sudo systemctl enable cml.service
sudo reboot