Files
threshold/api/internal/tests/detail_template_test.go
T

28 lines
668 B
Go
Raw Normal View History

package tests
2020-05-04 10:58:20 -04:00
2020-08-07 12:55:02 -04:00
// TODO: Reenable once we reimplement generation of As functions once static hosts lands
/*
2020-05-04 10:58:20 -04:00
func TestDetailTemplating(t *testing.T) {
lt := time.Now()
c := hosts.HostCatalog{
2020-05-05 14:28:20 -04:00
Id: "id",
2020-05-04 10:58:20 -04:00
CreatedTime: lt,
Attributes: map[string]interface{}{
"regions": []string{"a", "b"},
"access_key": "access",
"secret_key": "secret",
"rotate": true,
},
}
ac, err := c.AsAwsEc2HostCatalog()
assert.NoError(t, err)
assert.Equal(t, &hosts.AwsEc2HostCatalog{
HostCatalog: &c,
Regions: []string{"a", "b"},
AccessKey: api.String("access"),
SecretKey: api.String("secret"),
Rotate: api.Bool(true),
}, ac)
}
2020-08-07 12:55:02 -04:00
*/