From 127219f5103e6f1e5094541bd0d7cbdcafc819f6 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Thu, 17 Oct 2024 12:33:09 +0300 Subject: [PATCH] define build for running online and offline tests --- internal/testutil/offlinetest.go | 11 +++++++++++ internal/testutil/onlinetest.go | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100644 internal/testutil/offlinetest.go create mode 100644 internal/testutil/onlinetest.go diff --git a/internal/testutil/offlinetest.go b/internal/testutil/offlinetest.go new file mode 100644 index 0000000..476ade3 --- /dev/null +++ b/internal/testutil/offlinetest.go @@ -0,0 +1,11 @@ +// +build !online + +package testutil + +import ( + "git.grassecon.net/urdt/ussd/internal/handlers/server" +) + +var ( + AccountService server.AccountServiceInterface = &server.TestAccountService{} +) diff --git a/internal/testutil/onlinetest.go b/internal/testutil/onlinetest.go new file mode 100644 index 0000000..ddb5cf0 --- /dev/null +++ b/internal/testutil/onlinetest.go @@ -0,0 +1,9 @@ +// +build online + +package testutil + +import "git.grassecon.net/urdt/ussd/internal/handlers/server" + +var ( + AccountService server.AccountServiceInterface +)