blob: 4111ce34833265cf83753bc2eeee46a322208cf9 [file] [log] [blame]
Matteo Scandolo4a036262020-08-17 15:56:13 -07001/*
2 * Copyright 2018-present Open Networking Foundation
3
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7
8 * http://www.apache.org/licenses/LICENSE-2.0
9
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package common
18
19import (
20 "gotest.tools/assert"
21 "testing"
22)
23
24func TestLoadBBSimServices(t *testing.T) {
25 services, err := loadBBSimServices("../../configs/att-services.yaml")
26
27 assert.NilError(t, err)
28
29 assert.Equal(t, services[0].Name, "hsia")
30 assert.Equal(t, services[0].CTag, 900)
31 assert.Equal(t, services[0].STag, 900)
32 assert.Equal(t, services[0].CTagAllocation, TagAllocationUnique.String())
33 assert.Equal(t, services[0].STagAllocation, TagAllocationShared.String())
34 assert.Equal(t, services[0].NeedsEapol, true)
35 assert.Equal(t, services[0].NeedsDchp, true)
36 assert.Equal(t, services[0].NeedsIgmp, false)
37 assert.Equal(t, services[0].TechnologyProfileID, 64)
38}