From ea5caf58b94f0b41f5d5080d825d7ab33d0e61df Mon Sep 17 00:00:00 2001 From: Lukas Vogel Date: Tue, 14 Jan 2020 12:41:51 +0100 Subject: [PATCH] Fix gomocks (#3606) This was broken with the monolith service commit: https://github.com/scionproto/scion/pull/3590 --- go/cs/beacon/mock_beacon/beacon.go | 5 ++--- go/cs/beaconing/mock_beaconing/beaconing.go | 3 +-- go/cs/keepalive/mock_keepalive/keepalive.go | 3 +-- go/cs/revocation/mock_revocation/revocation.go | 3 +-- go/cs/segreq/mock_segreq/segreq.go | 3 +-- go/cs/segutil/mock_segutil/segutil.go | 3 +-- tools/gomocks | 12 ++++++------ 7 files changed, 13 insertions(+), 19 deletions(-) diff --git a/go/cs/beacon/mock_beacon/beacon.go b/go/cs/beacon/mock_beacon/beacon.go index 2387ee9064..9d76aa14c9 100644 --- a/go/cs/beacon/mock_beacon/beacon.go +++ b/go/cs/beacon/mock_beacon/beacon.go @@ -7,14 +7,13 @@ package mock_beacon import ( context "context" sql "database/sql" - reflect "reflect" - time "time" - gomock "github.com/golang/mock/gomock" beacon "github.com/scionproto/scion/go/cs/beacon" addr "github.com/scionproto/scion/go/lib/addr" common "github.com/scionproto/scion/go/lib/common" path_mgmt "github.com/scionproto/scion/go/lib/ctrl/path_mgmt" + reflect "reflect" + time "time" ) // MockDB is a mock of DB interface diff --git a/go/cs/beaconing/mock_beaconing/beaconing.go b/go/cs/beaconing/mock_beaconing/beaconing.go index 413bf8ce4e..ddf2451aac 100644 --- a/go/cs/beaconing/mock_beaconing/beaconing.go +++ b/go/cs/beaconing/mock_beaconing/beaconing.go @@ -6,11 +6,10 @@ package mock_beaconing import ( context "context" - reflect "reflect" - gomock "github.com/golang/mock/gomock" beacon "github.com/scionproto/scion/go/cs/beacon" proto "github.com/scionproto/scion/go/proto" + reflect "reflect" ) // MockBeaconInserter is a mock of BeaconInserter interface diff --git a/go/cs/keepalive/mock_keepalive/keepalive.go b/go/cs/keepalive/mock_keepalive/keepalive.go index 03ff3dff37..0b936d3df2 100644 --- a/go/cs/keepalive/mock_keepalive/keepalive.go +++ b/go/cs/keepalive/mock_keepalive/keepalive.go @@ -6,11 +6,10 @@ package mock_keepalive import ( context "context" - reflect "reflect" - gomock "github.com/golang/mock/gomock" addr "github.com/scionproto/scion/go/lib/addr" common "github.com/scionproto/scion/go/lib/common" + reflect "reflect" ) // MockIfStatePusher is a mock of IfStatePusher interface diff --git a/go/cs/revocation/mock_revocation/revocation.go b/go/cs/revocation/mock_revocation/revocation.go index ff332ebcf5..00bc2ec7af 100644 --- a/go/cs/revocation/mock_revocation/revocation.go +++ b/go/cs/revocation/mock_revocation/revocation.go @@ -6,10 +6,9 @@ package mock_revocation import ( context "context" - reflect "reflect" - gomock "github.com/golang/mock/gomock" path_mgmt "github.com/scionproto/scion/go/lib/ctrl/path_mgmt" + reflect "reflect" ) // MockStore is a mock of Store interface diff --git a/go/cs/segreq/mock_segreq/segreq.go b/go/cs/segreq/mock_segreq/segreq.go index f56a6205a6..a78cc2a96c 100644 --- a/go/cs/segreq/mock_segreq/segreq.go +++ b/go/cs/segreq/mock_segreq/segreq.go @@ -6,11 +6,10 @@ package mock_segreq import ( context "context" - reflect "reflect" - gomock "github.com/golang/mock/gomock" addr "github.com/scionproto/scion/go/lib/addr" query "github.com/scionproto/scion/go/lib/pathdb/query" + reflect "reflect" ) // MockLocalInfo is a mock of LocalInfo interface diff --git a/go/cs/segutil/mock_segutil/segutil.go b/go/cs/segutil/mock_segutil/segutil.go index 278d4c9ec6..03ae312183 100644 --- a/go/cs/segutil/mock_segutil/segutil.go +++ b/go/cs/segutil/mock_segutil/segutil.go @@ -5,10 +5,9 @@ package mock_segutil import ( - reflect "reflect" - gomock "github.com/golang/mock/gomock" pathpol "github.com/scionproto/scion/go/lib/pathpol" + reflect "reflect" ) // MockPolicy is a mock of Policy interface diff --git a/tools/gomocks b/tools/gomocks index 3aab90070b..1acfd5f829 100755 --- a/tools/gomocks +++ b/tools/gomocks @@ -32,11 +32,13 @@ STD_LIB_MOCKS_DIRECTORY = os.path.join("go", "lib", "mocks") MOCK_TARGETS = [ ("net", "Addr,Conn,PacketConn"), - (SCION_PACKAGE_PREFIX + "/go/beacon_srv/internal/beacon", "DB,Transaction"), - (SCION_PACKAGE_PREFIX + "/go/beacon_srv/internal/beaconing", + (SCION_PACKAGE_PREFIX + "/go/cs/beacon", "DB,Transaction"), + (SCION_PACKAGE_PREFIX + "/go/cs/beaconing", "BeaconInserter,BeaconProvider,SegmentProvider"), - (SCION_PACKAGE_PREFIX + "/go/beacon_srv/internal/keepalive", "IfStatePusher,RevDropper"), - (SCION_PACKAGE_PREFIX + "/go/beacon_srv/internal/revocation", "Store"), + (SCION_PACKAGE_PREFIX + "/go/cs/keepalive", "IfStatePusher,RevDropper"), + (SCION_PACKAGE_PREFIX + "/go/cs/revocation", "Store"), + (SCION_PACKAGE_PREFIX + "/go/cs/segreq", "LocalInfo"), + (SCION_PACKAGE_PREFIX + "/go/cs/segutil", "Policy"), (SCION_PACKAGE_PREFIX + "/go/hidden_path_srv/internal/registration", "Validator"), (SCION_PACKAGE_PREFIX + "/go/hidden_path_srv/internal/hpsegreq", "Fetcher"), (SCION_PACKAGE_PREFIX + "/go/lib/ctrl/seg", "Signer"), @@ -64,8 +66,6 @@ MOCK_TARGETS = [ (SCION_PACKAGE_PREFIX + "/go/lib/topology", "Topology"), (SCION_PACKAGE_PREFIX + "/go/lib/periodic/internal/metrics", "ExportMetric"), (SCION_PACKAGE_PREFIX + "/go/lib/xtest", "Callback"), - (SCION_PACKAGE_PREFIX + "/go/path_srv/internal/segreq", "LocalInfo"), - (SCION_PACKAGE_PREFIX + "/go/path_srv/internal/segutil", "Policy"), (SCION_PACKAGE_PREFIX + "/go/sciond/internal/fetcher", "Policy"), (SCION_PACKAGE_PREFIX + "/go/sig/internal/pathmgr", "Policy,Querier,Resolver"), (SCION_PACKAGE_PREFIX + "/go/sig/egress/iface", "Session"),