Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
goSDN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
goSDN
Commits
1b912c21
Commit
1b912c21
authored
2 years ago
by
André Sterba
Browse files
Options
Downloads
Plain Diff
Merge branch 'istaester/nbi-to-nib-refactoring' into istaester/init-application-framework
parents
913ce73a
6ff8237e
No related branches found
No related tags found
2 merge requests
!376
Add additional example application hostname-checker
,
!343
Add basic application framework and example application to show interaction between events an NBI
Pipeline
#107500
failed
2 years ago
Stage: build
Stage: test
Stage: analyze
Stage: integration-test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
controller/api/role_test.go
+4
-2
4 additions, 2 deletions
controller/api/role_test.go
controller/api/user_test.go
+2
-0
2 additions, 0 deletions
controller/api/user_test.go
with
6 additions
and
2 deletions
controller/api/role_test.go
+
4
−
2
View file @
1b912c21
...
@@ -61,7 +61,7 @@ func TestGetRole(t *testing.T) {
...
@@ -61,7 +61,7 @@ func TestGetRole(t *testing.T) {
ctx
context
.
Context
ctx
context
.
Context
addr
string
addr
string
name
string
name
string
uu
id
uuid
.
UUID
id
uuid
.
UUID
}
}
tests
:=
[]
struct
{
tests
:=
[]
struct
{
name
string
name
string
...
@@ -75,6 +75,7 @@ func TestGetRole(t *testing.T) {
...
@@ -75,6 +75,7 @@ func TestGetRole(t *testing.T) {
ctx
:
context
.
TODO
(),
ctx
:
context
.
TODO
(),
addr
:
testAPIEndpoint
,
addr
:
testAPIEndpoint
,
name
:
"adminTestRole"
,
name
:
"adminTestRole"
,
id
:
uuid
.
Nil
,
},
},
want
:
&
apb
.
GetRoleResponse
{
want
:
&
apb
.
GetRoleResponse
{
Status
:
apb
.
Status_STATUS_OK
,
Status
:
apb
.
Status_STATUS_OK
,
...
@@ -91,6 +92,7 @@ func TestGetRole(t *testing.T) {
...
@@ -91,6 +92,7 @@ func TestGetRole(t *testing.T) {
ctx
:
context
.
TODO
(),
ctx
:
context
.
TODO
(),
addr
:
testAPIEndpoint
,
addr
:
testAPIEndpoint
,
name
:
"not role"
,
name
:
"not role"
,
id
:
uuid
.
Nil
,
},
},
want
:
nil
,
want
:
nil
,
wantErr
:
true
,
wantErr
:
true
,
...
@@ -98,7 +100,7 @@ func TestGetRole(t *testing.T) {
...
@@ -98,7 +100,7 @@ func TestGetRole(t *testing.T) {
}
}
for
_
,
tt
:=
range
tests
{
for
_
,
tt
:=
range
tests
{
t
.
Run
(
tt
.
name
,
func
(
t
*
testing
.
T
)
{
t
.
Run
(
tt
.
name
,
func
(
t
*
testing
.
T
)
{
got
,
err
:=
GetRole
(
tt
.
args
.
ctx
,
tt
.
args
.
addr
,
tt
.
args
.
name
,
tt
.
args
.
uu
id
)
got
,
err
:=
GetRole
(
tt
.
args
.
ctx
,
tt
.
args
.
addr
,
tt
.
args
.
name
,
tt
.
args
.
id
)
if
(
err
!=
nil
)
!=
tt
.
wantErr
{
if
(
err
!=
nil
)
!=
tt
.
wantErr
{
t
.
Errorf
(
"GetRole() error = %v, wantErr %v"
,
err
,
tt
.
wantErr
)
t
.
Errorf
(
"GetRole() error = %v, wantErr %v"
,
err
,
tt
.
wantErr
)
return
return
...
...
This diff is collapsed.
Click to expand it.
controller/api/user_test.go
+
2
−
0
View file @
1b912c21
...
@@ -79,6 +79,7 @@ func TestGetUser(t *testing.T) {
...
@@ -79,6 +79,7 @@ func TestGetUser(t *testing.T) {
ctx
:
context
.
TODO
(),
ctx
:
context
.
TODO
(),
addr
:
testAPIEndpoint
,
addr
:
testAPIEndpoint
,
name
:
"testAdmin"
,
name
:
"testAdmin"
,
id
:
uuid
.
Nil
,
},
},
want
:
&
apb
.
GetUserResponse
{
want
:
&
apb
.
GetUserResponse
{
Status
:
apb
.
Status_STATUS_OK
,
Status
:
apb
.
Status_STATUS_OK
,
...
@@ -95,6 +96,7 @@ func TestGetUser(t *testing.T) {
...
@@ -95,6 +96,7 @@ func TestGetUser(t *testing.T) {
ctx
:
context
.
TODO
(),
ctx
:
context
.
TODO
(),
addr
:
testAPIEndpoint
,
addr
:
testAPIEndpoint
,
name
:
"foos"
,
name
:
"foos"
,
id
:
uuid
.
Nil
,
},
},
want
:
nil
,
want
:
nil
,
wantErr
:
true
,
wantErr
:
true
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment