Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func TestGetOverlayConfig(t *testing.T) {
- overlayUUID := uuid.UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1,
- 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
- underlayUUID := uuid.UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1,
- 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0x00}
- config := AppNetworkConfig{
- OverlayNetworkList: []OverlayNetworkConfig{
- OverlayNetworkConfig{Network: overlayUUID},
- },
- UnderlayNetworkList: []UnderlayNetworkConfig{
- UnderlayNetworkConfig{Network: underlayUUID},
- },
- }
- testMatrix := map[string]struct {
- network uuid.UUID
- config AppNetworkConfig
- }{
- "Overlay UUID": {
- network: overlayUUID,
- config: config,
- },
- }
- for testname, test := range testMatrix {
- t.Logf("Running test case %s", testname)
- config := test.config.getOverlayConfig(overlayUUID)
- assert.IsType(t, test.config, config)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement