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
6c6740f4
Commit
6c6740f4
authored
4 years ago
by
Malte Bauch
Browse files
Options
Downloads
Patches
Plain Diff
fixed initialism linting errors
parent
890f7094
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!120
Resolve "Code Quality"
,
!90
Develop
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmd/integration_test.go
+11
-11
11 additions, 11 deletions
cmd/integration_test.go
nucleus/gnmi_transport_test.go
+1
-1
1 addition, 1 deletion
nucleus/gnmi_transport_test.go
nucleus/http_test.go
+2
-2
2 additions, 2 deletions
nucleus/http_test.go
with
14 additions
and
14 deletions
cmd/integration_test.go
+
11
−
11
View file @
6c6740f4
...
@@ -9,7 +9,7 @@ import (
...
@@ -9,7 +9,7 @@ import (
)
)
var
testAddress
=
"141.100.70.171:6030"
var
testAddress
=
"141.100.70.171:6030"
var
testA
pi
Endpoint
=
"http://141.100.70.171:8080"
var
testA
PI
Endpoint
=
"http://141.100.70.171:8080"
var
testUsername
=
"admin"
var
testUsername
=
"admin"
var
testPassword
=
"arista"
var
testPassword
=
"arista"
...
@@ -20,7 +20,7 @@ func testSetupIntegration() {
...
@@ -20,7 +20,7 @@ func testSetupIntegration() {
}
}
api
:=
os
.
Getenv
(
"GOSDN_TEST_API_ENDPOINT"
)
api
:=
os
.
Getenv
(
"GOSDN_TEST_API_ENDPOINT"
)
if
api
!=
""
{
if
api
!=
""
{
testA
pi
Endpoint
=
api
testA
PI
Endpoint
=
api
}
}
u
:=
os
.
Getenv
(
"GOSDN_TEST_USER"
)
u
:=
os
.
Getenv
(
"GOSDN_TEST_USER"
)
if
u
!=
""
{
if
u
!=
""
{
...
@@ -53,7 +53,7 @@ func TestCliIntegration(t *testing.T) {
...
@@ -53,7 +53,7 @@ func TestCliIntegration(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
)
{
defer
viper
.
Reset
()
defer
viper
.
Reset
()
if
err
:=
cli
.
H
ttp
Get
(
testA
pi
Endpoint
,
"init"
);
(
err
!=
nil
)
!=
tt
.
wantErr
{
if
err
:=
cli
.
H
TTP
Get
(
testA
PI
Endpoint
,
"init"
);
(
err
!=
nil
)
!=
tt
.
wantErr
{
switch
err
.
(
type
)
{
switch
err
.
(
type
)
{
case
viper
.
ConfigFileNotFoundError
:
case
viper
.
ConfigFileNotFoundError
:
default
:
default
:
...
@@ -64,8 +64,8 @@ func TestCliIntegration(t *testing.T) {
...
@@ -64,8 +64,8 @@ func TestCliIntegration(t *testing.T) {
cliPnd
=
viper
.
GetString
(
"CLI_PND"
)
cliPnd
=
viper
.
GetString
(
"CLI_PND"
)
cliSbi
=
viper
.
GetString
(
"CLI_SBI"
)
cliSbi
=
viper
.
GetString
(
"CLI_SBI"
)
if
err
:=
cli
.
H
ttp
Get
(
if
err
:=
cli
.
H
TTP
Get
(
testA
pi
Endpoint
,
testA
PI
Endpoint
,
"addDevice"
,
"addDevice"
,
"address="
+
testAddress
,
"address="
+
testAddress
,
"password="
+
testPassword
,
"password="
+
testPassword
,
...
@@ -78,8 +78,8 @@ func TestCliIntegration(t *testing.T) {
...
@@ -78,8 +78,8 @@ func TestCliIntegration(t *testing.T) {
}
}
did
:=
viper
.
GetString
(
"LAST_DEVICE_UUID"
)
did
:=
viper
.
GetString
(
"LAST_DEVICE_UUID"
)
if
err
:=
cli
.
H
ttp
Get
(
if
err
:=
cli
.
H
TTP
Get
(
testA
pi
Endpoint
,
testA
PI
Endpoint
,
"request"
,
"request"
,
"uuid="
+
did
,
"uuid="
+
did
,
"sbi="
+
cliSbi
,
"sbi="
+
cliSbi
,
...
@@ -90,8 +90,8 @@ func TestCliIntegration(t *testing.T) {
...
@@ -90,8 +90,8 @@ func TestCliIntegration(t *testing.T) {
return
return
}
}
if
err
:=
cli
.
H
ttp
Get
(
if
err
:=
cli
.
H
TTP
Get
(
testA
pi
Endpoint
,
testA
PI
Endpoint
,
"getDevice"
,
"getDevice"
,
"address="
+
testAddress
,
"address="
+
testAddress
,
"uuid="
+
did
,
"uuid="
+
did
,
...
@@ -103,8 +103,8 @@ func TestCliIntegration(t *testing.T) {
...
@@ -103,8 +103,8 @@ func TestCliIntegration(t *testing.T) {
}
}
hostname
:=
guuid
.
New
()
.
String
()
hostname
:=
guuid
.
New
()
.
String
()
if
err
:=
cli
.
H
ttp
Get
(
if
err
:=
cli
.
H
TTP
Get
(
testA
pi
Endpoint
,
testA
PI
Endpoint
,
"set"
,
"set"
,
"address="
+
testAddress
,
"address="
+
testAddress
,
"uuid="
+
did
,
"uuid="
+
did
,
...
...
This diff is collapsed.
Click to expand it.
nucleus/gnmi_transport_test.go
+
1
−
1
View file @
6c6740f4
...
@@ -47,7 +47,7 @@ func TestMain(m *testing.M) {
...
@@ -47,7 +47,7 @@ func TestMain(m *testing.M) {
testSetupPnd
()
testSetupPnd
()
testSetupStore
()
testSetupStore
()
testSetupSbi
()
testSetupSbi
()
testSetupH
ttp
()
testSetupH
TTP
()
testSetupIntegration
()
testSetupIntegration
()
os
.
Exit
(
m
.
Run
())
os
.
Exit
(
m
.
Run
())
}
}
...
...
This diff is collapsed.
Click to expand it.
nucleus/http_test.go
+
2
−
2
View file @
6c6740f4
...
@@ -18,7 +18,7 @@ var args string
...
@@ -18,7 +18,7 @@ var args string
var
argsNotFound
string
var
argsNotFound
string
var
d
Device
var
d
Device
func
testSetupH
ttp
()
{
func
testSetupH
TTP
()
{
testSetupPnd
()
testSetupPnd
()
sbi
=
&
OpenConfig
{
id
:
defaultSbiID
}
sbi
=
&
OpenConfig
{
id
:
defaultSbiID
}
sbi
.
Schema
()
sbi
.
Schema
()
...
@@ -166,7 +166,7 @@ func Test_httpApi(t *testing.T) {
...
@@ -166,7 +166,7 @@ func Test_httpApi(t *testing.T) {
t
.
Errorf
(
"httpApi() got: %v, want %v"
,
got
.
StatusCode
,
tt
.
want
.
StatusCode
)
t
.
Errorf
(
"httpApi() got: %v, want %v"
,
got
.
StatusCode
,
tt
.
want
.
StatusCode
)
}
}
if
tt
.
name
==
"add-device"
{
if
tt
.
name
==
"add-device"
{
for
k
:=
range
pnd
.
(
*
pndImplementation
)
.
devices
.
store
{
for
k
:=
range
pnd
.
(
*
pndImplementation
)
.
devices
.
store
{
if
k
!=
mdid
{
if
k
!=
mdid
{
if
err
:=
pnd
.
RemoveDevice
(
k
);
err
!=
nil
{
if
err
:=
pnd
.
RemoveDevice
(
k
);
err
!=
nil
{
t
.
Error
(
err
)
t
.
Error
(
err
)
...
...
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