Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Cloud
MAS
clonemap
Commits
53e0febc
Commit
53e0febc
authored
Feb 13, 2021
by
Stefan Dähling
Browse files
add test to ci
parent
4ee4613a
Pipeline
#409933
passed with stages
in 4 minutes and 14 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
53e0febc
stages
:
-
build
#
- test
-
test
-
deploy
build
:
...
...
@@ -24,6 +24,14 @@ build:
-
cd ../kubestub
-
CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o kubestub
test
:
stage
:
test
image
:
golang:1.13.8
script
:
-
cd pkg
-
go test ./... -coverprofile cover.out
-
go tool cover -func cover.out
deploy
:
stage
:
deploy
image
:
docker:19.03.12
...
...
pkg/ams/ams_test.go
View file @
53e0febc
...
...
@@ -45,14 +45,17 @@ THE SOFTWARE.
package
ams
import
(
"log"
"net/http"
"os"
"strconv"
"testing"
"time"
agclient
"git.rwth-aachen.de/acs/public/cloud/mas/clonemap/pkg/agency/client"
amscli
"git.rwth-aachen.de/acs/public/cloud/mas/clonemap/pkg/ams/client"
"git.rwth-aachen.de/acs/public/cloud/mas/clonemap/pkg/common/httpreply"
dfclient
"git.rwth-aachen.de/acs/public/cloud/mas/clonemap/pkg/df/client"
"git.rwth-aachen.de/acs/public/cloud/mas/clonemap/pkg/schemas"
)
...
...
@@ -64,7 +67,11 @@ func TestAMS(t *testing.T) {
os
.
Setenv
(
"CLONEMAP_STORAGE_TYPE"
,
"local"
)
os
.
Setenv
(
"CLONEMAP_STUB_HOSTNAME"
,
"localhost"
)
os
.
Setenv
(
"CLONEMAP_LOG_LEVEL"
,
"error"
)
ams
:=
&
AMS
{}
ams
:=
&
AMS
{
logError
:
log
.
New
(
os
.
Stderr
,
"[ERROR] "
,
log
.
LstdFlags
),
agencyClient
:
agclient
.
New
(
time
.
Second
*
60
,
time
.
Second
*
1
,
4
),
dfClient
:
dfclient
.
New
(
time
.
Second
*
60
,
time
.
Second
*
1
,
4
),
}
// create storage and deployment object according to specified deployment type
err
:=
ams
.
init
()
if
err
!=
nil
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment