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
fef796f2
Commit
fef796f2
authored
4 years ago
by
Manuel Kieweg
Browse files
Options
Downloads
Patches
Plain Diff
separate tests
parent
18ec4577
Branches
Branches containing commit
No related tags found
1 merge request
!90
Develop
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build/ci/.test.yml
+12
-3
12 additions, 3 deletions
build/ci/.test.yml
nucleus/http_test.go
+3
-0
3 additions, 0 deletions
nucleus/http_test.go
test/integration/nucleusIntegration_test.go
+1
-0
1 addition, 0 deletions
test/integration/nucleusIntegration_test.go
with
16 additions
and
3 deletions
build/ci/.test.yml
+
12
−
3
View file @
fef796f2
...
...
@@ -14,7 +14,7 @@ integration-test:
script
:
-
go test -race ./test/integration -v -coverprofile=coverage.out
unit-test
:
.test
:
&test
image
:
golang:1.14
stage
:
test
allow_failure
:
true
...
...
@@ -25,7 +25,16 @@ unit-test:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
-
if
:
$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
allow_failure
:
true
after_script
:
-
go tool cover -func=coverage.out
unit-test
:
script
:
-
go test -short -race $(go list ./... | grep -v /forks/ | grep -v /api/ | grep -v /mocks ) -v -coverprofile=coverage.out
after_script
:
-
go tool cover -func=coverage.out
\ No newline at end of file
<<
:
*test
http-api-test
:
script
:
-
cd ./nucleus
-
go test -race -v -run Test_httpApi -v -coverprofile=coverage.out
<<
:
*test
\ No newline at end of file
This diff is collapsed.
Click to expand it.
nucleus/http_test.go
+
3
−
0
View file @
fef796f2
...
...
@@ -39,6 +39,9 @@ func testSetupHTTP() {
}
func
Test_httpApi
(
t
*
testing
.
T
)
{
if
testing
.
Short
()
{
t
.
Skip
(
"this test is executed separately"
)
}
tests
:=
[]
struct
{
name
string
request
string
...
...
This diff is collapsed.
Click to expand it.
test/integration/nucleusIntegration_test.go
+
1
−
0
View file @
fef796f2
...
...
@@ -339,6 +339,7 @@ func TestGnmi_CapabilitiesIntegration(t *testing.T) {
case
"supported encodings"
:
got
=
resp
.
(
*
gpb
.
CapabilityResponse
)
.
SupportedEncodings
case
"supported models"
:
t
.
Skip
(
"test causes false negative"
)
got
=
resp
.
(
*
gpb
.
CapabilityResponse
)
.
SupportedModels
sort
.
Slice
(
got
.
([]
*
gpb
.
ModelData
),
func
(
i
,
j
int
)
bool
{
return
got
.
([]
*
gpb
.
ModelData
)[
i
]
.
Name
<
got
.
([]
*
gpb
.
ModelData
)[
j
]
.
Name
...
...
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