Refactor kafka to pure Go (franz-go), fix DBC stubs, update Dockerfile
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"fiskerinc.com/modules/logger"
|
||||
"github.com/fiskerinc/cloud-services/pkg/logger"
|
||||
)
|
||||
|
||||
// Setup primes application while enabling proper
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
c "fiskerinc.com/modules/common/context"
|
||||
c "github.com/fiskerinc/cloud-services/pkg/common/context"
|
||||
)
|
||||
|
||||
// auth_helper gives tool to our authorization services so that future middleware components and actual endpoints will have access
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"fiskerinc.com/modules/utils"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils"
|
||||
)
|
||||
|
||||
func TestWriteProviderToContext(t *testing.T) {
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"fiskerinc.com/modules/logger"
|
||||
"fiskerinc.com/modules/validator"
|
||||
"github.com/fiskerinc/cloud-services/pkg/logger"
|
||||
"github.com/fiskerinc/cloud-services/pkg/validator"
|
||||
)
|
||||
|
||||
// ParseVINFromRequest retrieves VIN from "Ssl-Client-Subject-Dn"
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"fiskerinc.com/modules/utils"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils"
|
||||
)
|
||||
|
||||
func TestParseVINFromRequestBothFormats(t *testing.T) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"fiskerinc.com/modules/testhelper"
|
||||
"github.com/fiskerinc/cloud-services/pkg/testhelper"
|
||||
)
|
||||
|
||||
var defaultValue = "DEFAULT_VALUE"
|
||||
|
||||
@@ -3,7 +3,7 @@ package utils
|
||||
import (
|
||||
"testing"
|
||||
|
||||
th "fiskerinc.com/modules/testhelper"
|
||||
th "github.com/fiskerinc/cloud-services/pkg/testhelper"
|
||||
)
|
||||
|
||||
func TestHexadecimal(t *testing.T) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
"fiskerinc.com/modules/common"
|
||||
"github.com/fiskerinc/cloud-services/pkg/common"
|
||||
)
|
||||
|
||||
// LinkResult makes result with link and timestamp
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
m "fiskerinc.com/modules/common"
|
||||
th "fiskerinc.com/modules/testhelper"
|
||||
u "fiskerinc.com/modules/utils"
|
||||
m "github.com/fiskerinc/cloud-services/pkg/common"
|
||||
th "github.com/fiskerinc/cloud-services/pkg/testhelper"
|
||||
u "github.com/fiskerinc/cloud-services/pkg/utils"
|
||||
)
|
||||
|
||||
func TestRespError(t *testing.T) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"fiskerinc.com/modules/common"
|
||||
"github.com/fiskerinc/cloud-services/pkg/common"
|
||||
)
|
||||
|
||||
const ErrCodeJSONRPCParse = -32700
|
||||
|
||||
11
pkg/utils/localtests/localtests.go
Normal file
11
pkg/utils/localtests/localtests.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// Package localtests provides test utilities for local development.
|
||||
package localtests
|
||||
|
||||
import "os"
|
||||
|
||||
// SkipIfNotLocal skips the test if not running locally
|
||||
func SkipIfNotLocal(t interface{ Skip(...any) }) {
|
||||
if os.Getenv("LOCAL_TESTS") != "true" {
|
||||
t.Skip("Skipping local-only test")
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package mt19937
|
||||
|
||||
import (
|
||||
"fiskerinc.com/modules/logger"
|
||||
"github.com/fiskerinc/cloud-services/pkg/logger"
|
||||
)
|
||||
|
||||
type bernoulli_distribution struct {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package mt19937
|
||||
|
||||
import "fiskerinc.com/modules/logger"
|
||||
import "github.com/fiskerinc/cloud-services/pkg/logger"
|
||||
|
||||
type aliasTableUnit struct {
|
||||
weight float64
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
"testing"
|
||||
"fiskerinc.com/modules/utils"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils"
|
||||
)
|
||||
|
||||
func TestMultipartParser(t *testing.T) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"fiskerinc.com/modules/utils/quadkey"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils/quadkey"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package querystring_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"fiskerinc.com/modules/utils/querystring"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils/querystring"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"fiskerinc.com/modules/utils/mt19937"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils/mt19937"
|
||||
)
|
||||
|
||||
type Generator struct {
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"fiskerinc.com/modules/testhelper"
|
||||
"fiskerinc.com/modules/utils/randomvalues"
|
||||
"github.com/fiskerinc/cloud-services/pkg/testhelper"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils/randomvalues"
|
||||
)
|
||||
|
||||
func TestRandomString(t *testing.T) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"fiskerinc.com/modules/testhelper"
|
||||
"github.com/fiskerinc/cloud-services/pkg/testhelper"
|
||||
)
|
||||
|
||||
func checkQueryString(t *testing.T, querystring string, data map[string]string) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"fiskerinc.com/modules/common"
|
||||
"fiskerinc.com/modules/validator"
|
||||
"fiskerinc.com/modules/vindecoder"
|
||||
"github.com/fiskerinc/cloud-services/pkg/common"
|
||||
"github.com/fiskerinc/cloud-services/pkg/validator"
|
||||
"github.com/fiskerinc/cloud-services/pkg/vindecoder"
|
||||
"github.com/pkg/errors"
|
||||
"fiskerinc.com/modules/utils/envtool"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils/envtool"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -3,7 +3,7 @@ package utils
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"fiskerinc.com/modules/common"
|
||||
"github.com/fiskerinc/cloud-services/pkg/common"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package whereami
|
||||
|
||||
import "fiskerinc.com/modules/utils/envtool"
|
||||
import "github.com/fiskerinc/cloud-services/pkg/utils/envtool"
|
||||
|
||||
var (
|
||||
Environment serviceEnvironment = serviceEnvironment(envtool.GetEnv("APP_SERVICE_ENVIRONMENT", ""))
|
||||
|
||||
@@ -3,7 +3,7 @@ package whereami_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"fiskerinc.com/modules/utils/whereami"
|
||||
"github.com/fiskerinc/cloud-services/pkg/utils/whereami"
|
||||
)
|
||||
|
||||
func TestNoENV(t *testing.T){
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"encoding/xml"
|
||||
"net/http"
|
||||
|
||||
"fiskerinc.com/modules/common"
|
||||
"github.com/fiskerinc/cloud-services/pkg/common"
|
||||
)
|
||||
|
||||
// ErrorXMLResult makes error result
|
||||
|
||||
Reference in New Issue
Block a user