From 2562146faf5af663bf5c670645f587c21fe42e9a Mon Sep 17 00:00:00 2001 From: Steven Zou Date: Mon, 29 Apr 2019 18:47:29 +0800 Subject: [PATCH] adjust the order of robot test case of API_DB Signed-off-by: Steven Zou --- src/jobservice/main.go | 11 +++++++++-- tests/robot-cases/Group0-BAT/API_DB.robot | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/jobservice/main.go b/src/jobservice/main.go index 50d4923de..a5a1706f3 100644 --- a/src/jobservice/main.go +++ b/src/jobservice/main.go @@ -16,10 +16,17 @@ package main import ( "context" + "errors" "flag" "fmt" + "os" + + "github.com/goharbor/harbor/src/common" + comcfg "github.com/goharbor/harbor/src/common/config" "github.com/goharbor/harbor/src/jobservice/common/utils" "github.com/goharbor/harbor/src/jobservice/config" + "github.com/goharbor/harbor/src/jobservice/job" + "github.com/goharbor/harbor/src/jobservice/job/impl" "github.com/goharbor/harbor/src/jobservice/logger" "github.com/goharbor/harbor/src/jobservice/runtime" ) @@ -52,7 +59,7 @@ func main() { } // Set job context initializer - /*runtime.JobService.SetJobContextInitializer(func(ctx context.Context) (job.Context, error) { + runtime.JobService.SetJobContextInitializer(func(ctx context.Context) (job.Context, error) { secret := config.GetAuthSecret() if utils.IsEmptyStr(secret) { return nil, errors.New("empty auth secret") @@ -67,7 +74,7 @@ func main() { } return jobCtx, nil - })*/ + }) // Start if err := runtime.JobService.LoadAndRun(ctx, cancel); err != nil { diff --git a/tests/robot-cases/Group0-BAT/API_DB.robot b/tests/robot-cases/Group0-BAT/API_DB.robot index baf555c1a..cd657f56f 100644 --- a/tests/robot-cases/Group0-BAT/API_DB.robot +++ b/tests/robot-cases/Group0-BAT/API_DB.robot @@ -17,6 +17,8 @@ ${SERVER_API_ENDPOINT} ${SERVER_URL}/api &{SERVER_CONFIG} endpoint=${SERVER_API_ENDPOINT} verify_ssl=False *** Test Cases *** +Test Case - Garbage Collection + Harbor API Test ./tests/apitests/python/test_garbage_collection.py Test Case - Add Private Project Member and Check User Can See It Harbor API Test ./tests/apitests/python/test_add_member_to_private_project.py Test Case - Delete a Repository of a Certain Project Created by Normal User @@ -33,8 +35,6 @@ Test Case - Manage Project Member Harbor API Test ./tests/apitests/python/test_manage_project_member.py Test Case - Project Level Policy Content Trust Harbor API Test ./tests/apitests/python/test_project_level_policy_content_trust.py -Test Case - Garbage Collection - Harbor API Test ./tests/apitests/python/test_garbage_collection.py Test Case - User View Logs Harbor API Test ./tests/apitests/python/test_user_view_logs.py Test Case - Scan All Images