Skip to content

Commit

Permalink
squash: move tls_helpertest.go to helpertest/ since dep loop is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinkChaos committed Aug 30, 2024
1 parent 8638812 commit bdac97c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions util/tls_helpertest.go → helpertest/tls.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
package util
package helpertest

import (
"crypto/tls"
"crypto/x509"
"sync"

"github.com/0xERR0R/blocky/util"
. "github.com/onsi/gomega"
)

// FIXME: think about how modules can be moved so this can be in helpertest
// Right now it can't since it depends on util, and util has test code
// that uses helpertest.
// Maybe creating util_test would fix it.

const tlsTestServerName = "test.blocky.invalid"

type tlsData struct {
Expand All @@ -30,7 +26,7 @@ var (

func getTLSData() tlsData {
initTLSData.Do(func() {
cert, err := TLSGenerateSelfSignedCert([]string{tlsTestServerName})
cert, err := util.TLSGenerateSelfSignedCert([]string{tlsTestServerName})
Expect(err).Should(Succeed())

tlsDataStorage.ServerCfg = &tls.Config{
Expand Down

0 comments on commit bdac97c

Please sign in to comment.