Fixing test command to use vendored modules
Added first unit test
Change-Id: I88f6ca906764dbb9a071607bc0e9410d1b84ef0c
diff --git a/.gitignore b/.gitignore
index a725465..48b8bf9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-vendor/
\ No newline at end of file
+vendor/
diff --git a/Makefile b/Makefile
index 8e34d12..bfb85fd 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,10 @@
protos: api/bbsim/bbsim.pb.go # @HELP Build proto files
-build: protos # @HELP Build the binary
+dep: # @HELP Download the dependencies to the vendor folder
+ GO111MODULE=on go mod vendor
+
+build: dep protos # @HELP Build the binary
GO111MODULE=on go build -i -v -mod vendor \
-ldflags "-X main.buildTime=$(shell date +”%Y/%m/%d-%H:%M:%S”) \
-X main.commitHash=$(shell git log --pretty=format:%H -n 1) \
@@ -35,8 +38,10 @@
-X main.version=${VERSION}" \
-o ./cmd/bbsim ./internal/bbsim
-test: protos # @HELP Execute unit tests
- GO111MODULE=on go test ./internal/bbsim
+test: dep protos # @HELP Execute unit tests
+ GO111MODULE=on go test -v -mod vendor ./internal/bbsim/... -covermode count -coverprofile ./tests/results/go-test-coverage.out 2>&1 | tee ./tests/results/go-test-results.out
+ go-junit-report < ./tests/results/go-test-results.out > ./tests/results/go-test-results.xml
+ gocover-cobertura < ./tests/results/go-test-coverage.out > ./tests/results/go-test-coverage.xml
docker-build: # @HELP Build a docker container
docker build --build-arg GIT_STATUS=${GIT_STATUS} -t ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}bbsim:${DOCKER_TAG} -f build/package/Dockerfile .
diff --git a/README.md b/README.md
index dce2d07..039b5d5 100644
--- a/README.md
+++ b/README.md
@@ -81,4 +81,26 @@
}
```
-> This project strucutre is based on [golang-standards/project-layout](https://github.com/golang-standards/project-layout).
\ No newline at end of file
+## Development
+
+To use a patched version of the `omci-sim` library:
+
+```bash
+make dep
+cd vendor/github.com/opencord/
+rm -rf omci-sim/
+git clone https://gerrit.opencord.org/omci-sim
+cd omci-sim
+```
+
+Once done, go to `gerrit.opencord.org` and locate the patch you want to get. Click on the download URL and copy the `Checkout` command.
+
+It should look something like:
+
+```
+git fetch ssh://teone@gerrit.opencord.org:29418/omci-sim refs/changes/67/15067/1 && git checkout FETCH_HEAD
+```
+
+Then just execute that command in the `omci-sim` folder inside the vendored dependencies.
+
+> This project structure is based on [golang-standards/project-layout](https://github.com/golang-standards/project-layout).
diff --git a/build/ci/.keep b/build/ci/.keep
index e69de29..9e9aafc 100644
--- a/build/ci/.keep
+++ b/build/ci/.keep
@@ -0,0 +1,13 @@
+Copyright 2018-present Open Networking Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/go.mod b/go.mod
index 72fdc6f..bfea739 100644
--- a/go.mod
+++ b/go.mod
@@ -1,14 +1,17 @@
-module gerrit.opencord.org/bbsim
+module github.com/opencord/bbsim
go 1.12
require (
github.com/golang/protobuf v1.3.2
+ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 // indirect
github.com/looplab/fsm v0.1.0
- github.com/opencord/omci-sim v0.0.0-20190717165025-5ff7bb17f1e9
+ github.com/opencord/omci-sim v0.0.0-20190826212842-203314beba7e
github.com/opencord/voltha-protos v0.0.0-20190813191205-792553b747df
+ github.com/pkg/errors v0.8.1 // indirect
github.com/sirupsen/logrus v1.4.2
+ github.com/stretchr/testify v1.4.0 // indirect
+ github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect
google.golang.org/grpc v1.22.1
+ gotest.tools v2.2.0+incompatible
)
-
-replace github.com/opencord/omci-sim v0.0.0-20190717165025-5ff7bb17f1e9 => ./vendor/github.com/opencord/omci-sim
\ No newline at end of file
diff --git a/go.sum b/go.sum
index 749af46..25e3e31 100644
--- a/go.sum
+++ b/go.sum
@@ -1,6 +1,7 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
@@ -10,22 +11,35 @@
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc=
+github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/looplab/fsm v0.1.0 h1:Qte7Zdn/5hBNbXzP7yxVU4OIFHWXBovyTT2LaBTyC20=
github.com/looplab/fsm v0.1.0/go.mod h1:m2VaOfDHxqXBBMgc26m6yUOwkFn8H2AlJDE+jd/uafI=
github.com/opencord/omci-sim v0.0.0-20190717165025-5ff7bb17f1e9 h1:qUbCkEFUDEtOBeG6JfI2oMD6dmUa/zJldvBR59RhRdM=
github.com/opencord/omci-sim v0.0.0-20190717165025-5ff7bb17f1e9/go.mod h1:W10NTwE0xK9Kh++wrflXPfkknMCaNKkb7Io/ihO4y3k=
+github.com/opencord/omci-sim v0.0.0-20190826212842-203314beba7e h1:LHHUbAUR0LyFEHxl1KhMbSTZMDs4HvDngwIpmvvFE6U=
+github.com/opencord/omci-sim v0.0.0-20190826212842-203314beba7e/go.mod h1:ToOkj7hkHgoet9XQDadKMhYqgA7qItZsi2j1Pk/mX6Y=
github.com/opencord/voltha-protos v0.0.0-20190813191205-792553b747df h1:j/gaZts38ij2uVVikbXGqlm6n3hts1s0zWzUnBI96C4=
github.com/opencord/voltha-protos v0.0.0-20190813191205-792553b747df/go.mod h1:MDGL9ai3XOPbiZ0tA8U7k4twK/T/P0Hh4gtjNxNk/qY=
+github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8=
+github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=
@@ -44,4 +58,9 @@
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/grpc v1.22.1 h1:/7cs52RnTJmD43s3uxzlq2U7nqVTd/37viQwMrMNlOM=
google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
+gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/internal/bbsim/bbsim.go b/internal/bbsim/bbsim.go
index b353662..deb7f40 100644
--- a/internal/bbsim/bbsim.go
+++ b/internal/bbsim/bbsim.go
@@ -1,9 +1,25 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package main
import (
"flag"
- "gerrit.opencord.org/bbsim/api/bbsim"
- "gerrit.opencord.org/bbsim/internal/bbsim/devices"
+ "github.com/opencord/bbsim/api/bbsim"
+ "github.com/opencord/bbsim/internal/bbsim/devices"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
diff --git a/internal/bbsim/devices/helpers.go b/internal/bbsim/devices/helpers.go
index d764943..920b1d4 100644
--- a/internal/bbsim/devices/helpers.go
+++ b/internal/bbsim/devices/helpers.go
@@ -1,9 +1,27 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package devices
import "github.com/looplab/fsm"
+var newFSM = fsm.NewFSM
+
func getOperStateFSM(cb fsm.Callback) *fsm.FSM {
- return fsm.NewFSM(
+ return newFSM(
"down",
fsm.Events{
{Name: "enable", Src: []string{"down"}, Dst: "up"},
diff --git a/internal/bbsim/devices/helpers_test.go b/internal/bbsim/devices/helpers_test.go
new file mode 100644
index 0000000..2d01c1a
--- /dev/null
+++ b/internal/bbsim/devices/helpers_test.go
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package devices
+
+import (
+ "github.com/looplab/fsm"
+ "gotest.tools/assert"
+ "testing"
+)
+
+var (
+ originalNewFSM func(initial string, events []fsm.EventDesc, callbacks map[string]fsm.Callback) *fsm.FSM
+)
+
+func setUp(t *testing.T) {
+ originalNewFSM = newFSM
+}
+
+
+func tearDown() {
+ newFSM = originalNewFSM
+}
+
+func Test_Helpers(t *testing.T) {
+
+ // feedback values for the mock
+ called := 0
+ args := struct {
+ initial string
+ events []fsm.EventDesc
+ callbacks map[string]fsm.Callback
+ }{}
+
+ // creating the mock function
+ mockFSM := func(initial string, events []fsm.EventDesc, callbacks map[string]fsm.Callback) *fsm.FSM {
+ called++
+ args.initial = initial
+ args.events = events
+ args.callbacks = callbacks
+ return fsm.NewFSM(initial, events, callbacks)
+ }
+ newFSM = mockFSM
+
+ // params for the method under test
+ cb_called := 0
+ cb := func(e *fsm.Event) {
+ cb_called++
+ return
+ }
+
+ // calling the method under test
+ sm := getOperStateFSM(cb)
+
+ // verify
+ assert.Equal(t, called, 1, "Expected fsm.NewFSM to have been called once, instead it was called %d", called)
+ assert.Equal(t, args.initial, "down")
+
+ assert.Equal(t, args.events[0].Name, "enable")
+ assert.Equal(t, args.events[0].Src[0], "down")
+ assert.Equal(t, args.events[0].Dst, "up")
+
+ assert.Equal(t, args.events[1].Name, "disable")
+ assert.Equal(t, args.events[1].Src[0], "up")
+ assert.Equal(t, args.events[1].Dst, "down")
+
+ // this is to test that the callback is called when the state change
+ sm.Event("enable")
+ assert.Equal(t, cb_called, 1)
+
+}
\ No newline at end of file
diff --git a/internal/bbsim/devices/olt.go b/internal/bbsim/devices/olt.go
index 95cd882..7ace1c0 100644
--- a/internal/bbsim/devices/olt.go
+++ b/internal/bbsim/devices/olt.go
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package devices
import (
@@ -207,7 +223,7 @@
func (o OltDevice) sendOltIndication(msg OltIndicationMessage, stream openolt.Openolt_EnableIndicationServer) {
data := &openolt.Indication_OltInd{OltInd: &openolt.OltIndication{OperState: msg.OperState.String()}}
if err := stream.Send(&openolt.Indication{Data: data}); err != nil {
- oltLogger.Error("Failed to send Indication_OltInd: %v", err)
+ oltLogger.Errorf("Failed to send Indication_OltInd: %v", err)
}
oltLogger.WithFields(log.Fields{
@@ -226,7 +242,7 @@
}}
if err := stream.Send(&openolt.Indication{Data: operData}); err != nil {
- oltLogger.Error("Failed to send Indication_IntfOperInd for NNI: %v", err)
+ oltLogger.Errorf("Failed to send Indication_IntfOperInd for NNI: %v", err)
}
oltLogger.WithFields(log.Fields{
@@ -245,7 +261,7 @@
}}
if err := stream.Send(&openolt.Indication{Data: discoverData}); err != nil {
- oltLogger.Error("Failed to send Indication_IntfInd: %v", err)
+ oltLogger.Errorf("Failed to send Indication_IntfInd: %v", err)
}
oltLogger.WithFields(log.Fields{
@@ -260,7 +276,7 @@
}}
if err := stream.Send(&openolt.Indication{Data: operData}); err != nil {
- oltLogger.Error("Failed to send Indication_IntfOperInd for PON: %v", err)
+ oltLogger.Errorf("Failed to send Indication_IntfOperInd for PON: %v", err)
}
oltLogger.WithFields(log.Fields{
diff --git a/internal/bbsim/devices/onu.go b/internal/bbsim/devices/onu.go
index 8922b66..172ead4 100644
--- a/internal/bbsim/devices/onu.go
+++ b/internal/bbsim/devices/onu.go
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package devices
import (
@@ -94,7 +110,7 @@
SerialNumber: msg.Onu.SerialNumber,
}}
if err := stream.Send(&openolt.Indication{Data: discoverData}); err != nil {
- log.Error("Failed to send Indication_OnuDiscInd: %v", err)
+ log.Errorf("Failed to send Indication_OnuDiscInd: %v", err)
}
o.InternalState.Event("discover")
onuLogger.WithFields(log.Fields{
@@ -118,7 +134,7 @@
SerialNumber: o.SerialNumber,
}}
if err := stream.Send(&openolt.Indication{Data: indData}); err != nil {
- log.Error("Failed to send Indication_OnuInd: %v", err)
+ log.Errorf("Failed to send Indication_OnuInd: %v", err)
}
o.InternalState.Event("enable")
onuLogger.WithFields(log.Fields{
@@ -150,7 +166,7 @@
omci := &openolt.Indication_OmciInd{OmciInd: &omciInd}
if err := stream.Send(&openolt.Indication{Data: omci}); err != nil {
- onuLogger.Error("send omci indication failed: %v", err)
+ onuLogger.Errorf("send omci indication failed: %v", err)
}
onuLogger.WithFields(log.Fields{
"IntfId": o.PonPortID,
diff --git a/internal/bbsim/devices/types.go b/internal/bbsim/devices/types.go
index c1ec3b4..068ad66 100644
--- a/internal/bbsim/devices/types.go
+++ b/internal/bbsim/devices/types.go
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package devices
import (
diff --git a/internal/bbsim/grpc_api_server.go b/internal/bbsim/grpc_api_server.go
index 5d92f70..3c3ab3e 100644
--- a/internal/bbsim/grpc_api_server.go
+++ b/internal/bbsim/grpc_api_server.go
@@ -1,9 +1,25 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package main
import (
"context"
- "gerrit.opencord.org/bbsim/api/bbsim"
- "gerrit.opencord.org/bbsim/internal/bbsim/devices"
+ "github.com/opencord/bbsim/api/bbsim"
+ "github.com/opencord/bbsim/internal/bbsim/devices"
log "github.com/sirupsen/logrus"
)
diff --git a/internal/bbsim/types.go b/internal/bbsim/types.go
index bdba10e..e429bf4 100644
--- a/internal/bbsim/types.go
+++ b/internal/bbsim/types.go
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package main
// General
diff --git a/test/.keep b/test/.keep
deleted file mode 100644
index e69de29..0000000
--- a/test/.keep
+++ /dev/null
diff --git a/tests/.keep b/tests/.keep
new file mode 100644
index 0000000..9e9aafc
--- /dev/null
+++ b/tests/.keep
@@ -0,0 +1,13 @@
+Copyright 2018-present Open Networking Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/tests/results/.gitignore b/tests/results/.gitignore
new file mode 100644
index 0000000..c96a04f
--- /dev/null
+++ b/tests/results/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file