2018-04-04 22:24:21 -04:00
|
|
|
package useragent
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestUserAgent(t *testing.T) {
|
|
|
|
projectURL = "https://packer-test.com"
|
|
|
|
rt = "go5.0"
|
2018-04-05 14:25:11 -04:00
|
|
|
goos = "linux"
|
|
|
|
goarch = "amd64"
|
2018-04-04 22:24:21 -04:00
|
|
|
|
2020-11-09 20:09:32 -05:00
|
|
|
act := String("1.2.3")
|
2018-04-04 22:24:21 -04:00
|
|
|
|
2018-04-05 14:25:11 -04:00
|
|
|
exp := "Packer/1.2.3 (+https://packer-test.com; go5.0; linux/amd64)"
|
2018-04-04 22:24:21 -04:00
|
|
|
if exp != act {
|
|
|
|
t.Errorf("expected %q to be %q", act, exp)
|
|
|
|
}
|
|
|
|
}
|