summaryrefslogtreecommitdiff
path: root/pkg/vpn/bonafide/bonafide_sip_integration_test.go
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-10-01 20:45:43 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-10-02 13:28:36 +0200
commitd4e6561f2d65e2deab3a418f55b4ae4d8b6c8457 (patch)
tree074f245afcafa333e05d1df1d53cb794f41e1a59 /pkg/vpn/bonafide/bonafide_sip_integration_test.go
parentf798e3f30b6eb69b3655159f07a27571fb737e2b (diff)
[bug] remove apiURL from bonafide
it seems this was an attempt to make this injectable for tests, but it can work by changing config variables too.
Diffstat (limited to 'pkg/vpn/bonafide/bonafide_sip_integration_test.go')
-rw-r--r--pkg/vpn/bonafide/bonafide_sip_integration_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/vpn/bonafide/bonafide_sip_integration_test.go b/pkg/vpn/bonafide/bonafide_sip_integration_test.go
index ee74efe..3a7fc7f 100644
--- a/pkg/vpn/bonafide/bonafide_sip_integration_test.go
+++ b/pkg/vpn/bonafide/bonafide_sip_integration_test.go
@@ -20,6 +20,8 @@ import (
"bytes"
"os"
"testing"
+
+ "0xacab.org/leap/bitmask-vpn/pkg/config"
)
type SIPCreds struct {
@@ -44,12 +46,16 @@ func getSIPCreds() SIPCreds {
return creds
}
+func initTestConfigSIP() {
+ config.APIURL = "https://localhost:8000/"
+}
+
func _TestSIPIntegrationGetCert(t *testing.T) {
// FIXME: we need to automatize the webapi start
+ initTestConfigSIP()
creds := getSIPCreds()
b := New()
- b.apiURL = "http://localhost:8000/"
b.auth = &sipAuthentication{b.client, b.getURL("auth")}
ok, err := b.DoLogin(creds.userOk, creds.passOk)
if err != nil {