Fixes #1361 Fixes #3164 Corrected copy/paste typo in libmachine/provision/fedora_test.go Preserve environment when performing yum update for proxy settings. Signed-off-by: Eric A. Zarko <eric.zarko@oracle.com>
30 lines
465 B
Go
30 lines
465 B
Go
package provision
|
|
|
|
import (
|
|
"regexp"
|
|
"testing"
|
|
)
|
|
|
|
func TestOracleLinuxGenerateYumRepoList(t *testing.T) {
|
|
info := &OsRelease{
|
|
ID: "ol",
|
|
Version: "7.2",
|
|
}
|
|
p := NewOracleLinuxProvisioner(nil)
|
|
p.SetOsReleaseInfo(info)
|
|
|
|
buf, err := generateYumRepoList(p)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
m, err := regexp.MatchString(".*oraclelinux/7.*", buf.String())
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
if !m {
|
|
t.Fatalf("expected match for oraclelinux/7")
|
|
}
|
|
}
|