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
6ff8237e
Commit
6ff8237e
authored
3 years ago
by
André Sterba
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests
parent
69f7084f
No related branches found
No related tags found
3 merge requests
!376
Add additional example application hostname-checker
,
!344
Enhance northbound interface to get user and roles by id
,
!343
Add basic application framework and example application to show interaction between events an NBI
Pipeline
#107499
failed
3 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 @
6ff8237e
...
...
@@ -61,7 +61,7 @@ func TestGetRole(t *testing.T) {
ctx
context
.
Context
addr
string
name
string
uu
id
uuid
.
UUID
id
uuid
.
UUID
}
tests
:=
[]
struct
{
name
string
...
...
@@ -75,6 +75,7 @@ func TestGetRole(t *testing.T) {
ctx
:
context
.
TODO
(),
addr
:
testAPIEndpoint
,
name
:
"adminTestRole"
,
id
:
uuid
.
Nil
,
},
want
:
&
apb
.
GetRoleResponse
{
Status
:
apb
.
Status_STATUS_OK
,
...
...
@@ -91,6 +92,7 @@ func TestGetRole(t *testing.T) {
ctx
:
context
.
TODO
(),
addr
:
testAPIEndpoint
,
name
:
"not role"
,
id
:
uuid
.
Nil
,
},
want
:
nil
,
wantErr
:
true
,
...
...
@@ -98,7 +100,7 @@ func TestGetRole(t *testing.T) {
}
for
_
,
tt
:=
range
tests
{
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
{
t
.
Errorf
(
"GetRole() error = %v, wantErr %v"
,
err
,
tt
.
wantErr
)
return
...
...
This diff is collapsed.
Click to expand it.
controller/api/user_test.go
+
2
−
0
View file @
6ff8237e
...
...
@@ -79,6 +79,7 @@ func TestGetUser(t *testing.T) {
ctx
:
context
.
TODO
(),
addr
:
testAPIEndpoint
,
name
:
"testAdmin"
,
id
:
uuid
.
Nil
,
},
want
:
&
apb
.
GetUserResponse
{
Status
:
apb
.
Status_STATUS_OK
,
...
...
@@ -95,6 +96,7 @@ func TestGetUser(t *testing.T) {
ctx
:
context
.
TODO
(),
addr
:
testAPIEndpoint
,
name
:
"foos"
,
id
:
uuid
.
Nil
,
},
want
:
nil
,
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