blob: 2a57624f8e5975f3a4a1153dffe5db27ba4a61c5 [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)
Matteo Scandolo8a574812021-05-20 15:18:53 -070035 assert.Equal(t, services[0].NeedsDhcp, true)
Matteo Scandolo4a036262020-08-17 15:56:13 -070036 assert.Equal(t, services[0].NeedsIgmp, false)
37 assert.Equal(t, services[0].TechnologyProfileID, 64)
38}