(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestDefaultConfig(t *testing.T) { |
| 11 | defConf := DefaultConfig("app1") |
| 12 | assert.Equal(t, "app1", conv.S(defConf.Name)) |
| 13 | err := defConf.Validate() |
| 14 | assert.Nil(t, err) |
| 15 | |
| 16 | // max app name: 32 chars |
| 17 | defConf = DefaultConfig("12345678901234567890123456789012") |
| 18 | assert.Equal(t, "12345678901234567890123456789012", conv.S(defConf.Name)) |
| 19 | err = defConf.Validate() |
| 20 | assert.Nil(t, err) |
| 21 | assert.Len(t, conv.S(defConf.AWS.ELBLoadBalancerName), 32) |
| 22 | assert.Len(t, conv.S(defConf.AWS.ELBTargetGroupName), 32) |
| 23 | |
| 24 | // app name's too long |
| 25 | defConf = DefaultConfig("123456789012345678901234567890123") |
| 26 | err = defConf.Validate() |
| 27 | assert.NotNil(t, err) |
| 28 | } |
nothing calls this directly
no test coverage detected