Code Review
/
nonrtric
/
plt
/
sme.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CI: Add silent prescan SonarCloud job
[nonrtric/plt/sme.git]
/
capifcore
/
internal
/
publishservice
/
publishservice_test.go
diff --git
a/capifcore/internal/publishservice/publishservice_test.go
b/capifcore/internal/publishservice/publishservice_test.go
index
3f1a71f
..
69ca77e
100644
(file)
--- a/
capifcore/internal/publishservice/publishservice_test.go
+++ b/
capifcore/internal/publishservice/publishservice_test.go
@@
-262,35
+262,35
@@
func TestGetAllowedServices(t *testing.T) {
serviceUnderTest := NewPublishService(nil, nil, nil)
aefProfiles1 := []publishapi.AefProfile{}
serviceUnderTest := NewPublishService(nil, nil, nil)
aefProfiles1 := []publishapi.AefProfile{}
- api
Id1 := "apiId
1"
+ api
Name1 := "api Name
1"
aefProfiles2 := []publishapi.AefProfile{}
aefProfiles2 := []publishapi.AefProfile{}
- api
Id2 := "apiId
2"
+ api
Name2 := "api Name
2"
aefProfiles3 := []publishapi.AefProfile{}
aefProfiles3 := []publishapi.AefProfile{}
- api
Id3 := "apiId
3"
+ api
Name3 := "api Name
3"
aefProfiles4 := []publishapi.AefProfile{}
aefProfiles4 := []publishapi.AefProfile{}
- api
Id4 := "apiId
4"
+ api
Name4 := "api Name
4"
serviceUnderTest.publishedServices["publisher1"] = []publishapi.ServiceAPIDescription{
{
serviceUnderTest.publishedServices["publisher1"] = []publishapi.ServiceAPIDescription{
{
- Api
Id: &apiId
1,
+ Api
Name: apiName
1,
AefProfiles: &aefProfiles1,
},
{
AefProfiles: &aefProfiles1,
},
{
- Api
Id: &apiId
2,
+ Api
Name: apiName
2,
AefProfiles: &aefProfiles2,
},
{
AefProfiles: &aefProfiles2,
},
{
- Api
Id: &apiId
3,
+ Api
Name: apiName
3,
AefProfiles: &aefProfiles3,
},
{
AefProfiles: &aefProfiles3,
},
{
- Api
Id: &apiId
4,
+ Api
Name: apiName
4,
AefProfiles: &aefProfiles4,
},
}
serviceDescription := publishapi.ServiceAPIDescription{
AefProfiles: &aefProfiles4,
},
}
serviceDescription := publishapi.ServiceAPIDescription{
- Api
Id: &apiId
4,
+ Api
Name: apiName
4,
AefProfiles: &aefProfiles4,
}
serviceUnderTest.publishedServices["publisher2"] = []publishapi.ServiceAPIDescription{
AefProfiles: &aefProfiles4,
}
serviceUnderTest.publishedServices["publisher2"] = []publishapi.ServiceAPIDescription{
@@
-299,11
+299,11
@@
func TestGetAllowedServices(t *testing.T) {
allowedApiList := []publishapi.ServiceAPIDescription{
{
allowedApiList := []publishapi.ServiceAPIDescription{
{
- Api
Id: &apiId
2,
+ Api
Name: apiName
2,
AefProfiles: &aefProfiles2,
},
{
AefProfiles: &aefProfiles2,
},
{
- Api
Id: &apiId
3,
+ Api
Name: apiName
3,
AefProfiles: &aefProfiles3,
},
}
AefProfiles: &aefProfiles3,
},
}
@@
-317,7
+317,7
@@
func TestGetAllowedServices(t *testing.T) {
result = serviceUnderTest.GetAllowedPublishedServices([]publishapi.ServiceAPIDescription{})
assert.Len(t, result, 0)
result = serviceUnderTest.GetAllowedPublishedServices([]publishapi.ServiceAPIDescription{})
assert.Len(t, result, 0)
- // Create a list with no Api
Id
s
+ // Create a list with no Api
Name
s
badApiList := []publishapi.ServiceAPIDescription{
{
},
badApiList := []publishapi.ServiceAPIDescription{
{
},