Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Enables gofmt linting #53

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ linters-settings:

linters:
enable:
# - gofmt
- gofmt
# - govet
# - errcheck
# - staticcheck
Expand Down
54 changes: 29 additions & 25 deletions pcf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ func init() {
}
}

/*func init() {
factory.InitConfigFactory("amfTest/amfcfg.yaml")
}*/
/*
func init() {
factory.InitConfigFactory("amfTest/amfcfg.yaml")
}
*/
gab-arrobo marked this conversation as resolved.
Show resolved Hide resolved
func GetNetworkSliceConfig() *protos.NetworkSliceResponse {
var rsp protos.NetworkSliceResponse
rsp.NetworkSlice = make([]*protos.NetworkSlice, 0)
Expand Down Expand Up @@ -109,28 +111,30 @@ var Data = []byte(`{
}
]}`)

/*func TestUpdateConfig(t *testing.T) {
var nrp protos.NetworkSliceResponse
err := json.Unmarshal(Data, &nrp)
if err != nil {
panic(err)
}
var Rsp chan *protos.NetworkSliceResponse
Rsp = make(chan *protos.NetworkSliceResponse)
go func() {
Rsp <- &nrp
}()
go func() {
AMF.UpdateConfig(Rsp)
}()
time.Sleep(2 * time.Second)
if factory.AmfConfig.Configuration.SupportTAIList != nil &&
len(factory.AmfConfig.Configuration.SupportTAIList) == 2 {
fmt.Printf("test passed")
} else {
t.Errorf("test failed")
/*
func TestUpdateConfig(t *testing.T) {
var nrp protos.NetworkSliceResponse
err := json.Unmarshal(Data, &nrp)
if err != nil {
panic(err)
}
var Rsp chan *protos.NetworkSliceResponse
Rsp = make(chan *protos.NetworkSliceResponse)
go func() {
Rsp <- &nrp
}()
go func() {
AMF.UpdateConfig(Rsp)
}()
time.Sleep(2 * time.Second)
if factory.AmfConfig.Configuration.SupportTAIList != nil &&
len(factory.AmfConfig.Configuration.SupportTAIList) == 2 {
fmt.Printf("test passed")
} else {
t.Errorf("test failed")
}
}
}*/
*/
gab-arrobo marked this conversation as resolved.
Show resolved Hide resolved
func TestUpdatePcfSubsriberPolicyDataAdd(t *testing.T) {
var nrp protos.NetworkSliceResponse
err := json.Unmarshal(Data, &nrp)
Expand Down Expand Up @@ -226,7 +230,7 @@ var UData1 = []byte(`{
}
]}`)

//Two imsis deleted and 1 imsi added in device group
// Two imsis deleted and 1 imsi added in device group
func TestUpdatePcfSubsriberPolicyDataUpdate1(t *testing.T) {
var nrp protos.NetworkSliceResponse
err := json.Unmarshal(UData1, &nrp)
Expand Down
Loading